summaryrefslogtreecommitdiff
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-11 18:51:45 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-11 18:51:45 +0000
commit481acb11413a436653e235d2098990b2ad47d195 (patch)
treee2012f19845ed8251e04528df52aa39b5e7a59d6 /src/drawscreen.c
parentf6246f51e3d85a982a899b4a8fd9045a5e23016f (diff)
downloadvim-git-481acb11413a436653e235d2098990b2ad47d195.tar.gz
patch 8.2.4346: a custom statusline may cause Esc to work like Enterv8.2.4346
Problem: A custom statusline may cause Esc to work like Enter on the command line when the popup menu is displayed. Solution: Save and restore KeyTyped. (closes #9749)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 6cae313fa..69f44a9f9 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -571,6 +571,7 @@ redraw_custom_statusline(win_T *wp)
{
static int entered = FALSE;
int saved_did_emsg = did_emsg;
+ int saved_KeyTyped = KeyTyped;
// When called recursively return. This can happen when the statusline
// contains an expression that triggers a redraw.
@@ -591,6 +592,9 @@ redraw_custom_statusline(win_T *wp)
}
did_emsg |= saved_did_emsg;
entered = FALSE;
+
+ // A user function may reset KeyTyped, restore it.
+ KeyTyped = saved_KeyTyped;
}
#endif