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&
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
Included patches: 1-260
Compiled by [email protected]
Huge version with GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
+cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui
+diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search
+farsi
+file_in_path +find_in_path +float +folding -footer +gettext/dyn -
hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap
+libcall +linebreak
+lispindent +listcmds +localmap +lua/dyn +menu +mksession
+modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang
+mzscheme/dyn +netbeans_intg +ole
+path_extra +perl/dyn +persistent_undo -postscript +printer +profile
+python/dyn -python3 +quickfix +reltime +rightleft +ruby/dyn
+scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -
termresponse +textobjects
+title +toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows
+writebackup -xfontset -xim
-xterm_save -xpm_w32
--
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