Mercurial > vim
diff src/screen.c @ 27712:9c96612730a0 v8.2.4382
patch 8.2.4382: a custom 'tabline' may cause Esc to work like Enter
Commit: https://github.com/vim/vim/commit/e4835bf34001471a102528659af009bc46361141
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 14 19:17:53 2022 +0000
patch 8.2.4382: a custom 'tabline' may cause Esc to work like Enter
Problem: A custom 'tabline' may cause Esc to work like Enter on the
command line when the popup menu is displayed.
Solution: Save and restore KeyTyped. (closes #9776)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 14 Feb 2022 20:30:02 +0100 |
parents | fb4c30606b4a |
children | ba47c7d07ce6 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -1235,6 +1235,7 @@ win_redr_custom( int use_sandbox = FALSE; win_T *ewp; int p_crb_save; + int save_KeyTyped = KeyTyped; // There is a tiny chance that this gets called recursively: When // redrawing a status line triggers redrawing the ruler or tabline. @@ -1394,6 +1395,9 @@ win_redr_custom( theend: entered = FALSE; + + // A user function may reset KeyTyped, restore it. + KeyTyped = save_KeyTyped; } #endif // FEAT_STL_OPT