diff/highlight: do not overlay low-priority CursorLine

ref #6380
This commit is contained in:
Justin M. Keyes
2018-09-21 21:51:49 +02:00
parent a2d03d9b1a
commit 3283db4ecb
3 changed files with 7 additions and 5 deletions

View File

@@ -2826,7 +2826,7 @@ win_line (
draw_state = WL_BRI - 1;
}
// draw 'breakindent': indent wrapped text accodringly
// draw 'breakindent': indent wrapped text accordingly
if (draw_state == WL_BRI - 1 && n_extra == 0) {
draw_state = WL_BRI;
// if need_showbreak is set, breakindent also applies
@@ -3052,7 +3052,8 @@ win_line (
diff_hlf = HLF_CHD; // changed line
}
line_attr = win_hl_attr(wp, diff_hlf);
if (wp->w_p_cul && lnum == wp->w_cursor.lnum) {
// Overlay CursorLine onto diff highlight, unless it's low-priority.
if (!line_attr_lowprio && wp->w_p_cul && lnum == wp->w_cursor.lnum) {
line_attr = hl_combine_attr(line_attr, win_hl_attr(wp, HLF_CUL));
}
}