0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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 #8097,
            closes #7998)
This commit is contained in:
Bram Moolenaar
2021-04-11 13:29:18 +02:00
parent f93bbd0262
commit 09f067fca3
6 changed files with 52 additions and 4 deletions

View File

@@ -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);
}