summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-25 22:17:54 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-25 22:17:54 +0200
commit8c63e0ec314ba07d54b881dc629fe19e6eda1fb8 (patch)
tree5013e60903788494a6b7f9bea4cf7f1fcbf8fcc7
parent09037503ea5f957ad23121bc61e15e4bb1765edf (diff)
downloadvim-git-8c63e0ec314ba07d54b881dc629fe19e6eda1fb8.tar.gz
patch 8.1.0435: cursorline highlight not removed in some situationv8.1.0435
Problem: Cursorline highlight not removed in some situation. (Vitaly Yashin) Solution: Reset last_cursorline when resetting 'cursorline'. (Christian Brabandt, closes #3481)
-rw-r--r--src/move.c6
-rw-r--r--src/option.c5
-rw-r--r--src/proto/move.pro1
-rw-r--r--src/version.c2
4 files changed, 14 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c
index e9a3eb971..c07275897 100644
--- 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
/*
diff --git a/src/option.c b/src/option.c
index f89c4730b..19e2b4c54 100644
--- 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)
diff --git a/src/proto/move.pro b/src/proto/move.pro
index 3bc3fd9c3..f66e9cd18 100644
--- 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);
diff --git a/src/version.c b/src/version.c
index 73eff7d6b..d3b09ea4b 100644
--- 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,