]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4391: command line executed when typing Esc in the GUI v8.2.4391
authorBram Moolenaar <Bram@vim.org>
Tue, 15 Feb 2022 16:17:44 +0000 (16:17 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 15 Feb 2022 16:17:44 +0000 (16:17 +0000)
Problem:    Command line executed when typing Esc in the GUI.
Solution:   Move saving/restoring KeyTyped to build_stl_str_hl().
            (closes #9783)

src/buffer.c
src/screen.c
src/version.c

index b3e2bc3f98a3a6cff8b1fda816111acf0c8630ed..bb9c773679d4359c0f28f13190ae1722fbdc5c36 100644 (file)
@@ -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
index 9010090d799a9b65679b9a0259e8c795427075fc..adcc4b5bab59a97f38beb9c73137a7e88610ec34 100644 (file)
@@ -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
index 8edb112beebf6a19d14a9c6fa81f867dd3dfd6c7..e5bbd10be4a39b6b98707d99116c217c817c4d02 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4391,
 /**/
     4390,
 /**/