From 23c71d5182a5e717c3a1852d9d3c90e81b4735fd Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 12 Jan 2019 11:05:49 +0100 Subject: display: unify cursorline and concealcursor redraw logic There is various places where 'conceallevel' and 'concealcursor' necessitates additional redraws. This tries to separate the different cases and handle each accordingly: - Share code with 'cursorline' for the common case: vertical move of cursor within the same window (concealcursor not active) - Improve the logic for managing 'concealcursor' and switching modes: test for the case where the new mode behaves differently from the last one. - Clarify the special case for horizontal movement within a line when 'concealcursor' is active, now there is an if-statement only for this and not hidden in larger check mostly for the first point. - Keep the special case for moving between windows as is. --- src/nvim/globals.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/nvim/globals.h') diff --git a/src/nvim/globals.h b/src/nvim/globals.h index f749c119cd..2550fb8163 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -918,10 +918,6 @@ EXTERN disptick_T display_tick INIT(= 0); * cursor position in Insert mode. */ EXTERN linenr_T spell_redraw_lnum INIT(= 0); -/* Set when the cursor line needs to be redrawn. */ -EXTERN int need_cursor_line_redraw INIT(= FALSE); - - #ifdef USE_MCH_ERRMSG // Grow array to collect error messages in until they can be displayed. EXTERN garray_T error_ga INIT(= GA_EMPTY_INIT_VALUE); -- cgit