# HG changeset patch # User Christian Brabandt # Date 1537907405 -7200 # Node ID 10107703b9b25cc7f63f9bd758efedf516501c4a # Parent 1a576464722d533b803aaf1eeca41c09dc355427 patch 8.1.0435: cursorline highlight not removed in some situation commit https://github.com/vim/vim/commit/8c63e0ec314ba07d54b881dc629fe19e6eda1fb8 Author: Bram Moolenaar 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) diff --git a/src/move.c b/src/move.c --- 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 --- 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 --- 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 --- 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,