vim-patch:8.0.1275: CmdlineLeave autocmd prevents fold from opening

Problem:    CmdlineLeave autocmd prevents fold from opening. (Waivek)
Solution:   Save and restore KeyTyped. (closes vim/vim#2305)
c9e9c71409
This commit is contained in:
Jan Edmund Lazo 2018-09-13 22:48:29 -04:00
parent ae8515a544
commit 20354dbd75

View File

@ -6707,6 +6707,7 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
proftime_T wait_time;
bool did_save_redobuff = false;
save_redo_T save_redo;
const int save_KeyTyped = KeyTyped;
// Quickly return if there are no autocommands for this event or
// autocommands are blocked.
@ -6966,6 +6967,7 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io,
restore_funccal(save_funccalp);
if (do_profiling == PROF_YES)
prof_child_exit(&wait_time);
KeyTyped = save_KeyTyped;
xfree(fname);
xfree(sfname);
--nesting; /* see matching increment above */