summaryrefslogtreecommitdiffstats
path: root/src/drawline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-17 14:56:00 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-17 14:56:00 +0000
commitee28c707e474682151554499874fc7bfb53360cb (patch)
treed059a44f530de1c90d59d3d979dfbb38b2629ef3 /src/drawline.c
parent01ee52bab6041450095c53f9469b1b266a7e3d4d (diff)
patch 9.0.0894: virtual text property highlight ignores window backgroundv9.0.0894
Problem: Virtual text property highlight ignores window background. Solution: Combine text prop attribute with win_attr into extra_attr. (closes #11462)
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 90fbc2b1da..137b888654 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -130,7 +130,8 @@ typedef struct {
char_u *p_extra; // string of extra chars, plus NUL, only used
// when c_extra and c_final are NUL
char_u *p_extra_free; // p_extra buffer that needs to be freed
- int extra_attr; // attributes for p_extra
+ int extra_attr; // attributes for p_extra, should be combined
+ // with win_attr if needed
int c_extra; // extra chars, all the same
int c_final; // final char, mandatory if set
int extra_for_textprop; // wlv.n_extra set for textprop
@@ -1997,7 +1998,8 @@ win_line(
wlv.c_final = NUL;
wlv.n_extra = (int)STRLEN(p);
wlv.extra_for_textprop = TRUE;
- wlv.extra_attr = used_attr;
+ wlv.extra_attr = hl_combine_attr(wlv.win_attr,
+ used_attr);
n_attr = mb_charlen(p);
// restore search_attr and area_attr when n_extra
// is down to zero