]> granicus.if.org Git - vim/commitdiff
patch 8.0.0628: cursor disappears after silent mapping v8.0.0628
authorBram Moolenaar <Bram@vim.org>
Wed, 7 Jun 2017 18:39:47 +0000 (20:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 7 Jun 2017 18:39:47 +0000 (20:39 +0200)
Problem:    Cursor disappears after silent mapping. (Ramel Eshed)
Solution:   Do restore the cursor when it was changed, but don't change it in
            the first place for a silent mapping.

src/getchar.c
src/version.c

index ab3250aa33bdceeb3eb495d52ec098d2b34ba2e8..44b246de63d1ece1fdf5e2afbc5a599e50fba75f 100644 (file)
@@ -2583,7 +2583,7 @@ vgetorpeek(int advance)
  * get a character: 3. from the user - handle <Esc> in Insert mode
  */
                /*
-                * special case: if we get an <ESC> in insert mode and there
+                * Special case: if we get an <ESC> in insert mode and there
                 * are no more characters at once, we pretend to go out of
                 * insert mode.  This prevents the one second delay after
                 * typing an <ESC>.  If we get something after all, we may
@@ -2617,8 +2617,8 @@ vgetorpeek(int advance)
                        mode_deleted = TRUE;
                    }
 #ifdef FEAT_GUI
-                   /* may show different cursor shape */
-                   if (gui.in_use)
+                   /* may show different cursor shape */
+                   if (gui.in_use && State != NORMAL && !cmd_silent)
                    {
                        int         save_State;
 
@@ -2913,16 +2913,8 @@ vgetorpeek(int advance)
     }
 #ifdef FEAT_GUI
     /* may unshow different cursor shape */
-    if (gui.in_use)
-    {
-       if (cmd_silent)
-           gui_dont_update_cursor(TRUE);
-       else
-           gui_can_update_cursor();
-
-       if (shape_changed)
-           gui_update_cursor(TRUE, FALSE);
-    }
+    if (gui.in_use && shape_changed)
+       gui_update_cursor(TRUE, FALSE);
 #endif
 
     --vgetc_busy;
index 7a9b21c5df6cc0b53f31c415bdf51dcc853827e2..4b98f4457383b5082c11e086a33a3287070689e4 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    628,
 /**/
     627,
 /**/