changeset 14846:10107703b9b2 v8.1.0435

patch 8.1.0435: cursorline highlight not removed in some situation commit https://github.com/vim/vim/commit/8c63e0ec314ba07d54b881dc629fe19e6eda1fb8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 25 22:17:54 2018 +0200 patch 8.1.0435: cursorline highlight not removed in some situation Problem: Cursorline highlight not removed in some situation. (Vitaly Yashin) Solution: Reset last_cursorline when resetting 'cursorline'. (Christian Brabandt, closes #3481)
author Christian Brabandt <cb@256bit.org>
date Tue, 25 Sep 2018 22:30:05 +0200
parents 1a576464722d
children 8e190720301d
files src/move.c src/option.c src/proto/move.pro src/version.c
diffstat 4 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -125,6 +125,12 @@ comp_botline(win_T *wp)
 
 #ifdef FEAT_SYN_HL
 static linenr_T	last_cursorline = 0;
+
+    void
+reset_cursorline(void)
+{
+    last_cursorline = 0;
+}
 #endif
 
 /*
--- a/src/option.c
+++ b/src/option.c
@@ -8306,6 +8306,11 @@ set_bool_option(
 	p_lrm = !p_lnr;
 #endif
 
+#ifdef FEAT_SYN_HL
+    else if ((int *)varp == &curwin->w_p_cul && !value && old_value)
+	reset_cursorline();
+#endif
+
 #ifdef FEAT_PERSISTENT_UNDO
     /* 'undofile' */
     else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf)
--- a/src/proto/move.pro
+++ b/src/proto/move.pro
@@ -1,4 +1,5 @@
 /* move.c */
+void reset_cursorline(void);
 void update_topline_redraw(void);
 void update_topline(void);
 void update_curswant(void);
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    435,
+/**/
     434,
 /**/
     433,