vim-patch:8.1.2117: CursorLine highlight used while 'cursorline' is off

Problem:    CursorLine highlight used while 'cursorline' is off.
Solution:   Check 'cursorline' is set. (cloes vim/vim#5017)
49474ca122
This commit is contained in:
zeertzjq
2021-08-01 07:09:51 +08:00
parent 1666fe9dfe
commit 56b437a6c7
4 changed files with 6 additions and 6 deletions

View File

@@ -2809,11 +2809,11 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
if (num_sattr != NULL) {
// :sign defined with "numhl" highlight.
char_attr = num_sattr->sat_numhl;
} else if ((wp->w_p_cul || wp->w_p_rnu)
} else if (wp->w_p_cul
&& lnum == wp->w_cursor.lnum
&& (wp->w_p_culopt_flags & CULOPT_NBR)
&& (row == startrow
|| wp->w_p_culopt_flags & CULOPT_LINE)
&& lnum == wp->w_cursor.lnum
&& filler_todo == 0) {
// When 'cursorline' is set highlight the line number of
// the current line differently.