screen.c: Allow showbreak to override cursorline. (#13372)

I also added relevant tests.

Close #13369
This commit is contained in:
shade-of-noon
2020-11-25 11:47:03 -04:00
committed by GitHub
parent 104749440d
commit 2d5dd85eef
2 changed files with 54 additions and 3 deletions

View File

@@ -2836,9 +2836,9 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
* required when 'linebreak' is also set. */
if (tocol == vcol)
tocol += n_extra;
/* combine 'showbreak' with 'cursorline' */
// Combine 'showbreak' with 'cursorline', prioritizing 'showbreak'.
if (wp->w_p_cul && lnum == wp->w_cursor.lnum) {
char_attr = hl_combine_attr(char_attr, win_hl_attr(wp, HLF_CUL));
char_attr = hl_combine_attr(win_hl_attr(wp, HLF_CUL), char_attr);
}
}
}