]> granicus.if.org Git - vim/commitdiff
patch 8.1.2377: GUI: when losing focus a pending operator is executed v8.1.2377
authorBram Moolenaar <Bram@vim.org>
Sun, 1 Dec 2019 18:37:07 +0000 (19:37 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 1 Dec 2019 18:37:07 +0000 (19:37 +0100)
Problem:    GUI: when losing focus a pending operator is executed.
Solution:   Do not execute an operator when getting K_IGNORE. (closes #5300)

src/normal.c
src/version.c

index 363f539c738df7af0c715c59b2771e07dd650609..ca2a48c089c72b60135d707271cd394aec4b58b0 100644 (file)
@@ -1099,9 +1099,10 @@ getcount:
        old_mapped_len = typebuf_maplen();
 
     /*
-     * If an operation is pending, handle it...
+     * If an operation is pending, handle it.  But not for K_IGNORE.
      */
-    do_pending_operator(&ca, old_col, FALSE);
+    if (ca.cmdchar != K_IGNORE)
+       do_pending_operator(&ca, old_col, FALSE);
 
     /*
      * Wait for a moment when a message is displayed that will be overwritten
index 036a4bd697f399f4c61e56810c3db51efd95a2b9..4d50222d2eae4d9b526e629d311651c360d03ab9 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2377,
 /**/
     2376,
 /**/