vim-patch:8.2.4520: using wrong highlight for cursor line number

Problem:    Using wrong highlight for cursor line number.
Solution:   Take filler lines into account when using CursorLineNr.
            (closes vim/vim#9897)
127969cf98
This commit is contained in:
zeertzjq
2022-03-07 06:45:54 +08:00
parent bcda54b30e
commit ec3f93ff88
2 changed files with 29 additions and 3 deletions

View File

@@ -2890,9 +2890,9 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
} 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)
&& filler_todo == 0) {
&& (row == startrow + filler_lines
|| (row > startrow + filler_lines
&& wp->w_p_culopt_flags & CULOPT_LINE))) {
// When 'cursorline' is set highlight the line number of
// the current line differently.
// When 'cursorlineopt' has "screenline" only highlight