Loading ...
Sorry, an error occurred while loading the content.

Re: vim7 (and lower): mousem=popup_setpos problems

Expand Messages
  • Bram Moolenaar
    ... The mousemodel option is used for the default behavior of the mouse buttons, not for mappings. ... Only problem is that :popup always uses the cursor
    Message 1 of 2 , Jul 7, 2005
    • 0 Attachment
      Mikolaj Machowski wrote:

      > When doing mapping
      >
      > :map <C-LeftMouse> :popup Buffers<cr>
      >
      > with setting
      > set mousem=popup_setpos
      > or
      > set mousem=popup
      >
      > Popup menu is called on cursor position, not place of mouse click.
      >
      > Looks like it is the cause always when redefining map for calling popup
      > menu. Even simple
      >
      > map <RightMouse> :popup File<cr>
      >
      > Has the same unexpected behaviour.

      The 'mousemodel' option is used for the default behavior of the mouse
      buttons, not for mappings.

      You can sort-of do it by including <LeftMouse> in your mapping:

      :map <RightMouse> <LeftMouse>:popup File<CR>

      Only problem is that :popup always uses the cursor position, not the
      mouse coordinates. Changing that requires doing it for every
      system-specific GUI, thus that is not a quick hack. But I'll see what I
      can do...

      --
      hundred-and-one symptoms of being an internet addict:
      10E. You start counting in hex.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.