aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-23 11:28:32 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-24 16:08:59 +0800
commitc29a14d1fa58d5472bd14fec99c5b4228ed38b24 (patch)
treed17bb2d17d37dae688b4149b7a6a365889f9d9e0 /src/nvim/api/window.c
parent3e9b4e917d0783d0414192c3ad231cfcb813e73f (diff)
downloadrneovim-c29a14d1fa58d5472bd14fec99c5b4228ed38b24.tar.gz
rneovim-c29a14d1fa58d5472bd14fec99c5b4228ed38b24.tar.bz2
rneovim-c29a14d1fa58d5472bd14fec99c5b4228ed38b24.zip
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) https://github.com/vim/vim/commit/c20e46a4e3efcd408ef132872238144ea34f7ae5 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().
Diffstat (limited to 'src/nvim/api/window.c')
-rw-r--r--src/nvim/api/window.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c
index be43708604..fd33a82be3 100644
--- a/src/nvim/api/window.c
+++ b/src/nvim/api/window.c
@@ -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;
}