diff src/getchar.c @ 11486:1658ac359af1 v8.0.0626

patch 8.0.0626: in the GUI the cursor may flicker commit https://github.com/vim/vim/commit/e21d69eec1870a3f4732653aa8ee25d5da10128c Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 5 19:32:32 2017 +0200 patch 8.0.0626: in the GUI the cursor may flicker Problem: In the GUI the cursor may flicker. Solution: Check the cmd_silent flag before updating the cursor shape. (Hirohito Higashi, closes #1637)
author Christian Brabandt <cb@256bit.org>
date Mon, 05 Jun 2017 19:45:03 +0200
parents ff27a6a3a243
children 6a06738f8948
line wrap: on
line diff
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2913,8 +2913,16 @@ vgetorpeek(int advance)
     }
 #ifdef FEAT_GUI
     /* may unshow different cursor shape */
-    if (gui.in_use && shape_changed)
-	gui_update_cursor(TRUE, FALSE);
+    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);
+    }
 #endif
 
     --vgetc_busy;