summaryrefslogtreecommitdiff
path: root/src/cmdexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-11 19:38:56 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-11 19:38:56 +0100
commit11a57dfd16a47f248fe949344bd5db3f12b9bd32 (patch)
tree4830851e182451df3a7e3a6b1b6bc5316cfa60f4 /src/cmdexpand.c
parent1655619717ff109ea8bf1002883636d5af345e48 (diff)
downloadvim-git-11a57dfd16a47f248fe949344bd5db3f12b9bd32.tar.gz
patch 8.2.4738: Esc on commandline executes command instead of abandoning itv8.2.4738
Problem: Esc on commandline executes command instead of abandoning it. Solution: Save and restore KeyTyped when removing the popup menu. (closes #10154)
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r--src/cmdexpand.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 9bcea7e8d..87953375d 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -378,6 +378,7 @@ int cmdline_pum_active(void)
void cmdline_pum_remove(void)
{
int save_p_lz = p_lz;
+ int save_KeyTyped = KeyTyped;
pum_undisplay();
VIM_CLEAR(compl_match_array);
@@ -385,6 +386,10 @@ void cmdline_pum_remove(void)
update_screen(0);
p_lz = save_p_lz;
redrawcmd();
+
+ // When a function is called (e.g. for 'foldtext') KeyTyped might be reset
+ // as a side effect.
+ KeyTyped = save_KeyTyped;
}
void cmdline_pum_cleanup(cmdline_info_T *cclp)