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

Re: [taglist] 'mousefocus' problems, and patch for restoring GVIM window pos.

Expand Messages
  • Yegappan Lakshmanan
    Hello, ... The problem with the mousefocus option and the taglist plugin is due to a bug in Vim. This is fixed by patch 6.3.063 and also in Vim7. ... Can you
    Message 1 of 2 , Apr 6, 2005
    • 0 Attachment

      --- robertcharleswebb <RobertW@...> wrote:
      > Hi,
      > I just discovered the taglist plugin, and it's great!
      > I found a few problems though, and even made a patch (see below).
      > I use the 'mousefocus' option, which doesn't work well with taglist.
      > Here's what happens:
      > - After 4 seconds, when taglist updates, 'mousefocus' no longer works
      > until I actually click in a window. Then I can move between windows
      > without clicking again.
      > - Also after 4 seconds, when I click on the horizontal bar between two
      > windows and drag it up or down, it starts by jumping to a new place.
      > Seems to be only when moving the mouse from the lower window up to
      > the bar, and the bar jumps to where the cursor is in that lower
      > window.
      > - Before the 4 seconds is up, as I move the mouse from a lower
      > window up over a higher window (with no buttons down), the mouse
      > position jumps to the far right side of the window.
      > I tried fixing this last one. It seems that the only code that should
      > get called in this case is due to the following command:
      > autocmd BufEnter * call <SID>Tlist_Refresh()
      > So I looked in Tlist_Refresh() and added these lines:
      > let prevMouseFocus = &mousefocus
      > set nomousefocus
      > before "call s:Tlist_Open_Window()", and added this line:
      > let &mousefocus = prevMouseFocus
      > before "endfunction".
      > Didn't work though, don't know why.

      The problem with the 'mousefocus' option and the taglist
      plugin is due to a bug in Vim. This is fixed by
      patch 6.3.063 and also in Vim7.

      > Here are some more problems and suggestions:
      > - With Tlist_Use_SingleClick set, if I move the cursor to a tag with
      > the keyboard, then move the mouse into my source window (without
      > clicking), it jumps to that tag. (Maybe related to mousefocus
      > again).

      Can you try to reproduce this problem with the above
      Vim patch?

      > - With Tlist_Show_One_File set, switching from one buffer/window to
      > another completely replaces the tag list contents (as it should).
      > But the location of the highlighted current tag could be at the top
      > or bottom of the window depending on where the window was scrolled
      > to before the switch. I think a "zz" should be done after the
      > switch to put it in the middle.

      This was not done (based on a comment from Bram) to prevent
      screen jumps in the taglist window. Otherwise, every time
      you choose a tag from the taglist window, the tag will
      be moved to the center of the screen.

      > - Highlighting is wrong when using Tlist_Display_Prototype. All tags
      > end up with TagListFileName highlighting.

      I have fixed this in the 4.0 (beta 1) version of the
      taglist plugin.

      > - Would be great if the plugin could remember where the gvim window
      > was and restore it again when closing the taglist.
      > getwinposx() and getwinposy() can be used to get the position,
      > and ":winpos X Y" can be used to restore it. Actually, here's a
      > patch:

      If the user moved the window manually, then when he closes the
      taglist window, the position of the window will go back to
      the original position. This will surprise the user. Note that
      in most cases, the position of the Vim window should not change
      when you open the taglist window.

      - Yegappan

      Do you Yahoo!?
      Yahoo! Personals - Better first dates. More second dates.
    Your message has been successfully submitted and would be delivered to recipients shortly.