From 889f73e8618458ed46050e26cac0dee30a19b4f4 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Thu, 10 Jan 2019 23:34:13 +0100 Subject: screen: make update_screen() the only entry point for redrawing update_single_line() was only used for 'concealcursor'. But 'cursorline' has very similiar characteristics (redraw both lines on move cursor between lines) and works without its own special entry point to the redraw subsystem. Later on 'concealcursor' and 'cursorline' could share more logic, but for now make the former use standard redrawWinline(). Make sure it is called before update_screen(), so that it is immediately visible. Get rid of update_prepare() and update_finish(), and all issues from them and their callsites not being in sync with changes to update_screen() --- src/nvim/window.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/nvim/window.c') diff --git a/src/nvim/window.c b/src/nvim/window.c index 97c708ed20..35ca5c61e8 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -3542,11 +3542,13 @@ void win_goto(win_T *wp) win_enter(wp, true); - /* Conceal cursor line in previous window, unconceal in current window. */ - if (win_valid(owp) && owp->w_p_cole > 0 && !msg_scrolled) - update_single_line(owp, owp->w_cursor.lnum); - if (curwin->w_p_cole > 0 && !msg_scrolled) - need_cursor_line_redraw = TRUE; + // Conceal cursor line in previous window, unconceal in current window. + if (win_valid(owp) && owp->w_p_cole > 0 && !msg_scrolled) { + redrawWinline(owp, owp->w_cursor.lnum); + } + if (curwin->w_p_cole > 0 && !msg_scrolled) { + need_cursor_line_redraw = true; + } } -- cgit