Mercurial > vim
diff src/gui.c @ 1380:99a9e42e5688 v7.1.095
updated for version 7.1-095
author | vimboss |
---|---|
date | Wed, 05 Sep 2007 19:47:23 +0000 |
parents | a4365075d05c |
children | 40aa7ae37901 |
line wrap: on
line diff
--- a/src/gui.c +++ b/src/gui.c @@ -4519,7 +4519,18 @@ gui_focus_change(in_focus) xim_set_focus(in_focus); # endif - ui_focus_change(in_focus); + /* Put events in the input queue only when allowed. + * ui_focus_change() isn't called directly, because it invokes + * autocommands and that must not happen asynchronously. */ + if (!hold_gui_events) + { + char_u bytes[3]; + + bytes[0] = CSI; + bytes[1] = KS_EXTRA; + bytes[2] = in_focus ? (int)KE_FOCUSGAINED : (int)KE_FOCUSLOST; + add_to_input_buf(bytes, 3); + } #endif }