vim-patch:8.2.4557: confusing comment about 'cursorlineopt'

Problem:    Confusing comment about 'cursorlineopt'.
Solution:   Adjust comment.  (closes vim/vim#9939)  Add parenthesis around logical
            OR.
754d2b4036
This commit is contained in:
zeertzjq 2022-03-13 21:50:17 +08:00
parent 4ba12b3dda
commit 6e1caeaf3a

View File

@ -2788,11 +2788,11 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
&& (wp->w_p_culopt_flags & CULOPT_NBR) && (wp->w_p_culopt_flags & CULOPT_NBR)
&& (row == startrow + filler_lines && (row == startrow + filler_lines
|| (row > startrow + filler_lines || (row > startrow + filler_lines
&& wp->w_p_culopt_flags & CULOPT_LINE))) { && (wp->w_p_culopt_flags & CULOPT_LINE)))) {
// When 'cursorline' is set highlight the line number of // When 'cursorline' is set highlight the line number of
// the current line differently. // the current line differently.
// When 'cursorlineopt' has "screenline" only highlight // When 'cursorlineopt' does not have "line" only
// the line number itself. // highlight the line number itself.
// TODO(vim): Can we use CursorLine instead of CursorLineNr // TODO(vim): Can we use CursorLine instead of CursorLineNr
// when CursorLineNr isn't set? // when CursorLineNr isn't set?
char_attr = win_hl_attr(wp, HLF_CLN); char_attr = win_hl_attr(wp, HLF_CLN);