Mercurial > vim
changeset 27730:ba47c7d07ce6 v8.2.4391
patch 8.2.4391: command line executed when typing Esc in the GUI
Commit: https://github.com/vim/vim/commit/0e1f36fc59b589e4755fd9102013971f45222084
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 15 16:17:44 2022 +0000
patch 8.2.4391: command line executed when typing Esc in the GUI
Problem: Command line executed when typing Esc in the GUI.
Solution: Move saving/restoring KeyTyped to build_stl_str_hl().
(closes #9783)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 15 Feb 2022 17:30:03 +0100 |
parents | 596e8f64acc2 |
children | 9c5bc8cb5e28 |
files | src/buffer.c src/screen.c src/version.c |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -4164,6 +4164,7 @@ build_stl_str_hl( stl_hlrec_T *sp; int save_must_redraw = must_redraw; int save_redr_type = curwin->w_redr_type; + int save_KeyTyped = KeyTyped; if (stl_items == NULL) { @@ -5060,6 +5061,9 @@ build_stl_str_hl( curwin->w_redr_type = save_redr_type; } + // A user function may reset KeyTyped, restore it. + KeyTyped = save_KeyTyped; + return width; } #endif // FEAT_STL_OPT
--- a/src/screen.c +++ b/src/screen.c @@ -1235,7 +1235,6 @@ 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. @@ -1395,9 +1394,6 @@ win_redr_custom( theend: entered = FALSE; - - // A user function may reset KeyTyped, restore it. - KeyTyped = save_KeyTyped; } #endif // FEAT_STL_OPT