summaryrefslogtreecommitdiff
path: root/src/drawline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-02 22:00:15 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-02 22:00:15 +0100
commit024dbd229fa7991b7bf7ef4d0888b43ab03783f7 (patch)
treed12b2978dd45ca333c33cc5d3e47d2d3ce9bf4ff /src/drawline.c
parentf2885d3fb7045d14ae58824e9cb8dea65e4052c4 (diff)
downloadvim-git-024dbd229fa7991b7bf7ef4d0888b43ab03783f7.tar.gz
patch 8.1.2241: match highlight does not combine with 'wincolor'v8.1.2241
Problem: Match highlight does not combine with 'wincolor'. Solution: Apply 'wincolor' last on top of any other attribute. (closes #5159)
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 7caba051b..dcfe92cc6 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -751,8 +751,6 @@ win_line(
win_attr = wcr_attr;
area_highlighting = TRUE;
}
- if (vi_attr != 0 && win_attr != 0)
- vi_attr = hl_combine_attr(win_attr, vi_attr);
#ifdef FEAT_TEXT_PROP
if (WIN_IS_POPUP(wp))
@@ -1444,10 +1442,6 @@ win_line(
prev_syntax_attr = syntax_attr;
}
- // combine syntax attribute with 'wincolor'
- if (syntax_attr != 0 && win_attr != 0)
- syntax_attr = hl_combine_attr(win_attr, syntax_attr);
-
if (did_emsg)
{
wp->w_s->b_syn_error = TRUE;
@@ -1548,8 +1542,15 @@ win_line(
#endif
}
}
- if (char_attr == 0)
- char_attr = win_attr;
+
+ // combine attribute with 'wincolor'
+ if (win_attr != 0)
+ {
+ if (char_attr == 0)
+ char_attr = win_attr;
+ else
+ char_attr = hl_combine_attr(win_attr, char_attr);
+ }
// Get the next character to put on the screen.
@@ -3140,4 +3141,3 @@ win_line(
vim_free(p_extra_free);
return row;
}
-