diff src/gui.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 b37d22c73eca
children 4ae10e6c3a9c
line wrap: on
line diff
--- a/src/gui.c
+++ b/src/gui.c
@@ -1120,6 +1120,11 @@ gui_update_cursor(
 		    || gui.row != gui.cursor_row || gui.col != gui.cursor_col)
     {
 	gui_undraw_cursor();
+
+	// If a cursor-less sleep is ongoing, leave the cursor invisible
+	if (cursor_is_sleeping())
+	    return;
+
 	if (gui.row < 0)
 	    return;
 #ifdef HAVE_INPUT_METHOD