mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
perf(screen): reduce cursorline redrawing when jumping around
vim-patch:8.2.4614: redrawing too much when 'cursorline' is set
Problem: Redrawing too much when 'cursorline' is set and jumping around.
Solution: Rely on win_update() to redraw the current and previous cursor
line, do not mark lines as modified. (closes vim/vim#9996)
c20e46a4e3
This doesn't match the patch exactly, because I missed some lines when
porting patch 8.1.2029, and these lines were removed in this patch.
This also makes win_update() always update for 'concealcursor' like how
it always updates for 'cursorline', as 'cursorline' and 'concealcursor'
redrawing logic has been unified in Nvim.
As redrawing for 'cursorline' now always only requires VALID redraw
type, it is no longer necessary to call redraw_for_cursorline() in
nvim_win_set_cursor().
This commit is contained in:
@@ -119,7 +119,6 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
|
||||
update_topline_win(win);
|
||||
|
||||
redraw_later(win, VALID);
|
||||
redraw_for_cursorline(win);
|
||||
win->w_redr_status = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user