0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4738: Esc on commandline executes command instead of abandoning it

Problem:    Esc on commandline executes command instead of abandoning it.
Solution:   Save and restore KeyTyped when removing the popup menu.
            (closes #10154)
This commit is contained in:
Bram Moolenaar
2022-04-11 19:38:56 +01:00
parent 1655619717
commit 11a57dfd16
5 changed files with 50 additions and 0 deletions

View File

@@ -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)