Hi Ben!

On Mi, 14 Sep 2011, Ben Fritz wrote:

> FocusLost and FocusGained seem to have some problems when dealing with
> system() calls.
> 
> Starting with gvim -N -u NONE -i NONE, the first script (at the end of
> this message) echos:
> 
> system command
> focus gained
> 
> I would expect it to also echo "focus lost".
> 
> The second script echos:
> 
> system command
> focus gained
> 
> I would expect it to only echo "system command".
> 
> More succinctly, FocusLost is never called with a system command even
> though FocusGained is, and FocusGained is always called even if its
> event is supposedly being ignored.
> 
> Since FocusLost/FocusGained often come in pairs which assume the
> presence of the other, this can cause some weird problems.
> 
> First script:
> 
> autocmd FocusLost * echomsg "focus lost"
> autocmd FocusGained * echomsg "focus gained"
> 
> echomsg system("echo system command")
> 
> Second script:
> 
> autocmd FocusLost * echomsg "focus lost"
> autocmd FocusGained * echomsg "focus gained"
> 
> set ei=all
> echomsg system("echo system command")
> set ei&

I don't see that behaviour. For me, I don't get any FocusGained/Lost 
Message in GTK-Gvim 7.3.315
I don't even know, whether this is supposed to be triggered in the 
terminal at least it doesn't trigger for me in an urxvt terminal. Ah, 
the help says, it only triggers in certain terminals. May be xterm, no 
doesn't work there either.

> Vim Version:
> 
> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 21 2011 14:27:37)
> MS-Windows 32-bit GUI version with OLE support

Could that be Windows specific, may be?

regards,
Christian
-- 
Das Christentum ist eine gewaltige Macht. Daß zum Beispiel
protestantische Missionare aus Asien unbekehrt wieder nach Hause
kommen - das ist eine große Leistung.
                -- Kurt Tucholsky

-- 
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