comparison 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
comparison
equal deleted inserted replaced
24427:e255d418a91d 24428:9299d21d1d5d
295 did_one = TRUE; 295 did_one = TRUE;
296 296
297 // Remove the cursor before starting to do anything, because 297 // Remove the cursor before starting to do anything, because
298 // scrolling may make it difficult to redraw the text under 298 // scrolling may make it difficult to redraw the text under
299 // it. 299 // it.
300 if (gui.in_use && wp == curwin) 300 // Also remove the cursor if it needs to be hidden due to an
301 // ongoing cursor-less sleep.
302 if (gui.in_use && (wp == curwin || cursor_is_sleeping()))
301 { 303 {
302 gui_cursor_col = gui.cursor_col; 304 gui_cursor_col = gui.cursor_col;
303 gui_cursor_row = gui.cursor_row; 305 gui_cursor_row = gui.cursor_row;
304 gui_undraw_cursor(); 306 gui_undraw_cursor();
305 did_undraw = TRUE; 307 did_undraw = TRUE;
306 } 308 }
307 } 309 }
308 #endif 310 #endif
309
310 win_update(wp); 311 win_update(wp);
311 } 312 }
312 313
313 // redraw status line after the window to minimize cursor movement 314 // redraw status line after the window to minimize cursor movement
314 if (wp->w_redr_status) 315 if (wp->w_redr_status)