aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-09-21 21:51:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-11-27 01:14:55 +0100
commit3283db4ecbe32c6f2bbf1c7ea3032ef4091d5444 (patch)
treea329a51ec37632108d789302af81c9b53ca066a2 /src/nvim/screen.c
parenta2d03d9b1acc922e6fe1d7a9bae14027271ae7a6 (diff)
downloadrneovim-3283db4ecbe32c6f2bbf1c7ea3032ef4091d5444.tar.gz
rneovim-3283db4ecbe32c6f2bbf1c7ea3032ef4091d5444.tar.bz2
rneovim-3283db4ecbe32c6f2bbf1c7ea3032ef4091d5444.zip
diff/highlight: do not overlay low-priority CursorLine
ref #6380
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 1de5e5cc3d..2a1dae1767 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -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));
}
}