aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYichao Zhou <broken.zhoug@gmail.com>2016-05-11 19:16:07 -0700
committerJustin M. Keyes <justinkz@gmail.com>2016-05-20 03:54:20 -0400
commit33486c8ebd57074d9c92c4de06ea4dcab573c01e (patch)
treecb58967c9f2fd99aaf467f0d756437f6afa83bdb
parent56cb1eb9f9579f56361a7208e776f5d15d4cdde7 (diff)
downloadrneovim-33486c8ebd57074d9c92c4de06ea4dcab573c01e.tar.gz
rneovim-33486c8ebd57074d9c92c4de06ea4dcab573c01e.tar.bz2
rneovim-33486c8ebd57074d9c92c4de06ea4dcab573c01e.zip
Let the highlight of listchars override cursorline
Closes #3670
-rw-r--r--src/nvim/screen.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 10b5b6bba4..a1f74279ce 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -3402,11 +3402,9 @@ win_line (
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ') {
c = lcs_trail;
- if (!attr_pri) {
- n_attr = 1;
- extra_attr = hl_attr(HLF_8);
- saved_attr2 = char_attr; /* save current attr */
- }
+ n_attr = 1;
+ extra_attr = hl_attr(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
mb_utf8 = TRUE;
@@ -3555,10 +3553,8 @@ win_line (
}
lcs_eol_one = -1;
--ptr; /* put it back at the NUL */
- if (!attr_pri) {
- extra_attr = hl_attr(HLF_AT);
- n_attr = 1;
- }
+ extra_attr = hl_attr(HLF_AT);
+ n_attr = 1;
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
mb_utf8 = TRUE;
@@ -3587,11 +3583,9 @@ win_line (
n_extra = byte2cells(c) - 1;
c = *p_extra++;
}
- if (!attr_pri) {
- n_attr = n_extra + 1;
- extra_attr = hl_attr(HLF_8);
- saved_attr2 = char_attr; /* save current attr */
- }
+ n_attr = n_extra + 1;
+ extra_attr = hl_attr(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
mb_utf8 = FALSE; /* don't draw as UTF-8 */
} else if (VIsual_active
&& (VIsual_mode == Ctrl_V
@@ -3703,10 +3697,8 @@ win_line (
}
/* Don't override visual selection highlighting. */
- if (n_attr > 0
- && draw_state == WL_LINE
- && !attr_pri)
- char_attr = extra_attr;
+ if (n_attr > 0 && draw_state == WL_LINE)
+ char_attr = hl_combine_attr(char_attr, extra_attr);
/*
* Handle the case where we are in column 0 but not on the first