diff src/drawscreen.c @ 24428:9299d21d1d5d v8.2.2754

patch 8.2.2754: :sleep! does not always hide the cursor Commit: https://github.com/vim/vim/commit/09f067fca38c9f89ad088e8c096c4df3998575e2 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 11 13:29:18 2021 +0200 patch 8.2.2754: :sleep! does not always hide the cursor Problem: :sleep! does not always hide the cursor. Solution: Add the cursor_is_asleep flag. (Jeremy Lerner, closes https://github.com/vim/vim/issues/8097, closes #7998)
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Apr 2021 13:30:06 +0200
parents 8938c0c98149
children 3efc5cb6a404
line wrap: on
line diff
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -297,7 +297,9 @@ update_screen(int type_arg)
 		// Remove the cursor before starting to do anything, because
 		// scrolling may make it difficult to redraw the text under
 		// it.
-		if (gui.in_use && wp == curwin)
+		// Also remove the cursor if it needs to be hidden due to an
+		// ongoing cursor-less sleep.
+		if (gui.in_use && (wp == curwin || cursor_is_sleeping()))
 		{
 		    gui_cursor_col = gui.cursor_col;
 		    gui_cursor_row = gui.cursor_row;
@@ -306,7 +308,6 @@ update_screen(int type_arg)
 		}
 	    }
 #endif
-
 	    win_update(wp);
 	}