]> granicus.if.org Git - vim/commitdiff
patch 8.1.0435: cursorline highlight not removed in some situation v8.1.0435
authorBram Moolenaar <Bram@vim.org>
Tue, 25 Sep 2018 20:17:54 +0000 (22:17 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 25 Sep 2018 20:17:54 +0000 (22:17 +0200)
Problem:    Cursorline highlight not removed in some situation. (Vitaly
            Yashin)
Solution:   Reset last_cursorline when resetting 'cursorline'. (Christian
            Brabandt, closes #3481)

src/move.c
src/option.c
src/proto/move.pro
src/version.c

index e9a3eb971e0095e82716eaf45678523fd45c58fa..c07275897d19c1858c76de6d7539dc140dadf8fa 100644 (file)
@@ -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
 
 /*
index f89c4730bba2170db94022de149898be3f45fcf7..19e2b4c545b56668afc1a354d0079e202bfcf326 100644 (file)
@@ -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)
index 3bc3fd9c33f4bdf4d50e23cab5cbbb0b2ea0b458..f66e9cd18387e97ef6d74e70924fda4cfdbeaef8 100644 (file)
@@ -1,4 +1,5 @@
 /* move.c */
+void reset_cursorline(void);
 void update_topline_redraw(void);
 void update_topline(void);
 void update_curswant(void);
index 73eff7d6b5a80f2643a1328963f2bc0cedb0dbf3..d3b09ea4bf8cf8500313ccd449cdc0dab0ed35ae 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    435,
 /**/
     434,
 /**/