From 102af4f82303e1bada777769df0c88c5637c9129 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Thu, 18 Sep 2014 20:29:52 +0900 Subject: vim-patch:7.4.410 Problem: Fold does not open after search when there is a CmdwinLeave autocommand. Solution: Restore KeyTyped. (Jacob Niehus) https://code.google.com/p/vim/source/detail?r=v7-4-410 --- src/nvim/ex_getln.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/ex_getln.c') diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 810df627c1..b8d8837092 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -5200,9 +5200,14 @@ static int ex_window(void) RedrawingDisabled = i; + int save_KeyTyped = KeyTyped; + /* Trigger CmdwinLeave autocommands. */ apply_autocmds(EVENT_CMDWINLEAVE, typestr, typestr, FALSE, curbuf); + /* Restore KeyTyped in case it is modified by autocommands */ + KeyTyped = save_KeyTyped; + /* Restore the command line info. */ ccline = save_ccline; cmdwin_type = 0; -- cgit