diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-11-27 02:26:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 02:26:24 +0100 |
commit | 0653ed63a508f9c8934d4033e1116e5176ff4fc1 (patch) | |
tree | 7bc6ca50659f2e80d0105974a850f9f2f420bc9c /src/nvim/screen.c | |
parent | 271c5df41603f5427540082a3f8790bca0fd7595 (diff) | |
parent | 7fdb45e0f8b2dfc367067c62e413dd8082d770d5 (diff) | |
download | rneovim-0653ed63a508f9c8934d4033e1116e5176ff4fc1.tar.gz rneovim-0653ed63a508f9c8934d4033e1116e5176ff4fc1.tar.bz2 rneovim-0653ed63a508f9c8934d4033e1116e5176ff4fc1.zip |
Merge #9028 'diff/highlight: low-priority CursorLine'
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 1de5e5cc3d..eb24e2af1c 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,8 +3052,13 @@ win_line ( diff_hlf = HLF_CHD; // changed line } line_attr = win_hl_attr(wp, diff_hlf); + // Overlay CursorLine onto diff-mode highlight. if (wp->w_p_cul && lnum == wp->w_cursor.lnum) { - line_attr = hl_combine_attr(line_attr, win_hl_attr(wp, HLF_CUL)); + line_attr = 0 != line_attr_lowprio // Low-priority CursorLine + ? hl_combine_attr(hl_combine_attr(win_hl_attr(wp, HLF_CUL), + line_attr), + hl_get_underline()) + : hl_combine_attr(line_attr, win_hl_attr(wp, HLF_CUL)); } } |