summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-11 13:29:18 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-11 13:29:18 +0200
commit09f067fca38c9f89ad088e8c096c4df3998575e2 (patch)
tree4b6f8d96e2ddd80541748e2484e75c41abea0954 /src/drawscreen.c
parentf93bbd026205f36915312193784f987ad49fb114 (diff)
patch 8.2.2754: :sleep! does not always hide the cursorv8.2.2754
Problem: :sleep! does not always hide the cursor. Solution: Add the cursor_is_asleep flag. (Jeremy Lerner, closes #8097, closes #7998)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 0e36e79173..7df4a96f0e 100644
--- 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);
}