I often use Vim running on another host, with the X connection tunneled
through ssh. That introduces a small amount of delay when updating big
areas, which probably helps me to see the issue.

It has been like this for a a while, maybe as long as tabs have been
present.  I'm using 7.2 with GTK GUI, but the exact version is probably
not so important, since I've seen the bug for so long.  I have never
been able to pinpoint sufficient preconditions, however I have found a
few necessary ones.

This is what I see:

- I have multiple tabs open (2 is enough)
- The current tab is *not* the leftmost one
- I move my mouse from outside the Vim window to inside it.
  Since I use focus-follows-mouse, this gives the Vim the focus.
  (My window manager is ctwm, which may or may not matter)
- The filename shown in the leftmost tab is abbreviated
  (shows like "/m/f/t/v/o/T/g/s/g/sa.py"). If you were to click on the
  tab, it shows "sa.py").
- The filename in the current tab shows "FileFormats.py".
- The current directories (:lcd) of both tabs are not the same.

- When the mouse enters, the edit-part of the window is cleared, the
  leftmost tab highlights as if selected (but it doesn't show the
  filename as if clicked upon), then the correct tab highlights again
  and the editor text is redrawn. This repeats a few times. So this
  flashes a lot and takes noticeable time.

These conditions together are not sufficient (and some of them may not
even be necessary). If I save my session with :mksession and :source
Session.vim in a new Vim instance, the bug does not immediately occur.
There must be at least one other circumstance, which I haven't been able
to find yet, which is needed to trigger the bug.

If I use xev to snoop on the X events that are sent to the (outermost)
window, when the mouse enters, I see the following.

(You can use "xev -id <windowid>" to find the events, and "xwininfo" to
find the windowid, and "xwininfo -tree" to find all X windows related to
a "window")

    EnterNotify event, serial 13, synthetic NO, window 0x1a00003,
        root 0x40, subw 0x1a0002b, time 111771148, (531,559), root:(1078,619),
        mode NotifyNormal, detail NotifyNonlinearVirtual, same_screen YES,
        focus NO, state 0

    KeymapNotify event, serial 13, synthetic NO, window 0x0,
        keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

    FocusIn event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyPointer

    KeymapNotify event, serial 13, synthetic NO, window 0x0,
        keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

    FocusOut event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyPointer

    FocusIn event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyNonlinear

    KeymapNotify event, serial 13, synthetic NO, window 0x0,
        keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

    FocusOut event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyInferior

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a05116, (3,28), width 147, height 21,
        border_width 0, above 0x1a0002b, override NO

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a051da, (154,30), width 99, height 19,
        border_width 0, above 0x1a05116, override NO

    Expose event, serial 13, synthetic NO, window 0x1a00003,
        (154,28), width 99, height 2, count 0

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a05116, (3,30), width 147, height 19,
        border_width 0, above 0x1a0002b, override NO

    Expose event, serial 13, synthetic NO, window 0x1a00003,
        (3,28), width 147, height 2, count 0

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a051da, (154,28), width 99, height 21,
        border_width 0, above 0x1a05116, override NO

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a05116, (3,28), width 147, height 21,
        border_width 0, above 0x1a0002b, override NO

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a051da, (154,30), width 99, height 19,
        border_width 0, above 0x1a05116, override NO

    Expose event, serial 13, synthetic NO, window 0x1a00003,
        (154,28), width 99, height 2, count 0

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a05116, (3,30), width 147, height 19,
        border_width 0, above 0x1a0002b, override NO

    Expose event, serial 13, synthetic NO, window 0x1a00003,
        (3,28), width 147, height 2, count 0

    ConfigureNotify event, serial 13, synthetic NO, window 0x1a00003,
        event 0x1a00003, window 0x1a051da, (154,28), width 99, height 21,
        border_width 0, above 0x1a05116, override NO

If I do the same while the leftmost tab is current, you get just these events:

    EnterNotify event, serial 13, synthetic NO, window 0x1a00003,
        root 0x40, subw 0x1a0002b, time 111995499, (526,524), root:(1073,584),
        mode NotifyNormal, detail NotifyNonlinearVirtual, same_screen YES,
        focus NO, state 0

    KeymapNotify event, serial 13, synthetic NO, window 0x0,
        keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

    FocusIn event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyPointer

    KeymapNotify event, serial 13, synthetic NO, window 0x0,
        keys:  64  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

    FocusOut event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyPointer

    FocusIn event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyNonlinear

    KeymapNotify event, serial 13, synthetic NO, window 0x0,
        keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

    FocusOut event, serial 13, synthetic NO, window 0x1a00003,
        mode NotifyNormal, detail NotifyInferior


The ConfigureNotify events indicate that a window has moved up or down
in the window stack, and the Expose events mean that some part of a
window must be redrawn. I suppose you get something like that when a set
of tabs re-arrange which of their windows are visible.

Has anyone else seen this?

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui