Skip to content

Commit 8c63e0e

Browse files
committed
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)
1 parent 0903750 commit 8c63e0e

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/move.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ comp_botline(win_T *wp)
125125

126126
#ifdef FEAT_SYN_HL
127127
static linenr_T last_cursorline = 0;
128+
129+
void
130+
reset_cursorline(void)
131+
{
132+
last_cursorline = 0;
133+
}
128134
#endif
129135

130136
/*

src/option.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8306,6 +8306,11 @@ set_bool_option(
83068306
p_lrm = !p_lnr;
83078307
#endif
83088308

8309+
#ifdef FEAT_SYN_HL
8310+
else if ((int *)varp == &curwin->w_p_cul && !value && old_value)
8311+
reset_cursorline();
8312+
#endif
8313+
83098314
#ifdef FEAT_PERSISTENT_UNDO
83108315
/* 'undofile' */
83118316
else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf)

src/proto/move.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* move.c */
2+
void reset_cursorline(void);
23
void update_topline_redraw(void);
34
void update_topline(void);
45
void update_curswant(void);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ static char *(features[]) =
794794

795795
static int included_patches[] =
796796
{ /* Add new patch number below this line */
797+
/**/
798+
435,
797799
/**/
798800
434,
799801
/**/

0 commit comments

Comments
 (0)