mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.2241: match highlight does not combine with 'wincolor'
Problem: Match highlight does not combine with 'wincolor'. Solution: Apply 'wincolor' last on top of any other attribute. (closes #5159)
This commit is contained in:
@@ -751,8 +751,6 @@ win_line(
|
|||||||
win_attr = wcr_attr;
|
win_attr = wcr_attr;
|
||||||
area_highlighting = TRUE;
|
area_highlighting = TRUE;
|
||||||
}
|
}
|
||||||
if (vi_attr != 0 && win_attr != 0)
|
|
||||||
vi_attr = hl_combine_attr(win_attr, vi_attr);
|
|
||||||
|
|
||||||
#ifdef FEAT_TEXT_PROP
|
#ifdef FEAT_TEXT_PROP
|
||||||
if (WIN_IS_POPUP(wp))
|
if (WIN_IS_POPUP(wp))
|
||||||
@@ -1444,10 +1442,6 @@ win_line(
|
|||||||
prev_syntax_attr = syntax_attr;
|
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)
|
if (did_emsg)
|
||||||
{
|
{
|
||||||
wp->w_s->b_syn_error = TRUE;
|
wp->w_s->b_syn_error = TRUE;
|
||||||
@@ -1548,8 +1542,15 @@ win_line(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// combine attribute with 'wincolor'
|
||||||
|
if (win_attr != 0)
|
||||||
|
{
|
||||||
if (char_attr == 0)
|
if (char_attr == 0)
|
||||||
char_attr = win_attr;
|
char_attr = win_attr;
|
||||||
|
else
|
||||||
|
char_attr = hl_combine_attr(win_attr, char_attr);
|
||||||
|
}
|
||||||
|
|
||||||
// Get the next character to put on the screen.
|
// Get the next character to put on the screen.
|
||||||
|
|
||||||
@@ -3140,4 +3141,3 @@ win_line(
|
|||||||
vim_free(p_extra_free);
|
vim_free(p_extra_free);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
|1+0#ffffff16#e000002@2| +0#0000000#ffffff0|2@2| |3@2| @63
|
|1+0#ffffff16#e000002@2| +0#0000000#ffffff0|2@2| |3@2| @63
|
||||||
>4+0#ffffff16#e000002@2| +0#0000000#ffffff0|5@2| |6+0&#ffff4012@2| +0&#ffffff0@63
|
>4+0#4040ff13&@2| +0#0000000&|5@2| |6+0&#ffff4012@2| +0&#ffffff0@63
|
||||||
|~+0#4040ff13&| @7|╔+0#0000001#ffd7ff255|═@10|╗| +0#4040ff13#ffffff0@52
|
|~+0#4040ff13&| @7|╔+0#0000001#ffd7ff255|═@10|╗| +0#4040ff13#ffffff0@52
|
||||||
|~| @7|║+0#0000001#ffd7ff255|1+0#ffffff16#e000002@2| +0#0000001#ffd7ff255|2@2| |3@2|║| +0#4040ff13#ffffff0@52
|
|~| @7|║+0#0000001#ffd7ff255|1+0#ffffff16#e000002@2| +0#0000001#ffd7ff255|2@2| |3@2|║| +0#4040ff13#ffffff0@52
|
||||||
|~| @7|║+0#0000001#ffd7ff255|4@2| |5+0#ffffff16#e000002@2| +0#0000001#ffd7ff255|6@2|║| +0#4040ff13#ffffff0@52
|
|~| @7|║+0#0000001#ffd7ff255|4@2| |5+0#4040ff13&@2| +0#0000001&|6@2|║| +0#4040ff13#ffffff0@52
|
||||||
|~| @7|╚+0#0000001#ffd7ff255|═@10|╝| +0#4040ff13#ffffff0@52
|
|~| @7|╚+0#0000001#ffd7ff255|═@10|╝| +0#4040ff13#ffffff0@52
|
||||||
|~| @73
|
|~| @73
|
||||||
|~| @73
|
|~| @73
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
>1+0&#ffffff0| @73
|
>1+0&#ffffff0| @73
|
||||||
|2| @73
|
|2| @73
|
||||||
|3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21
|
|3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21
|
||||||
|4| @20|║+0#0000001#ffd7ff255| |o+0#0000000#5fd7ff255|n|e| +0#0000001&@23| +0&#ffd7ff255|║| +0#0000000#ffffff0@21
|
|4| @20|║+0#0000001#ffd7ff255| |o+0fd7ff255|n|e| @23| +0&#ffd7ff255|║| +0#0000000#ffffff0@21
|
||||||
|5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
|
|5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
|
||||||
|6| @20|║+0#0000001#ffd7ff255| |a|n|o|t|h|e|r| @20|║| +0#0000000#ffffff0@21
|
|6| @20|║+0#0000001#ffd7ff255| |a|n|o|t|h|e|r| @20|║| +0#0000000#ffffff0@21
|
||||||
|7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
|
|7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21
|
|3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| |l|i|s|t| |╗| +0#0000000#ffffff0@21
|
||||||
|4| @20|║+0#0000001#ffd7ff255| |o|n|e| @24|║| +0#0000000#ffffff0@21
|
|4| @20|║+0#0000001#ffd7ff255| |o|n|e| @24|║| +0#0000000#ffffff0@21
|
||||||
|5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
|
|5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
|
||||||
|6| @20|║+0#0000001#ffd7ff255| |a+0#0000000#5fd7ff255|n|o|t|h|e|r| +0#0000001&@19| +0&#ffd7ff255|║| +0#0000000#ffffff0@21
|
|6| @20|║+0#0000001#ffd7ff255| |a+0fd7ff255|n|o|t|h|e|r| @19| +0&#ffd7ff255|║| +0#0000000#ffffff0@21
|
||||||
|7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
|
|7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
|
||||||
|8| @73
|
|8| @73
|
||||||
|9| @73
|
|9| @73
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
>1+0&#ffffff0| @73
|
>1+0&#ffffff0| @73
|
||||||
|2| @73
|
|2| @73
|
||||||
|3| @31|╔+0#0000001#ffd7ff255|═@6|╗| +0#0000000#ffffff0@32
|
|3| @31|╔+0#0000001#ffd7ff255|═@6|╗| +0#0000000#ffffff0@32
|
||||||
|4| @31|║+0#0000001#ffd7ff255| |o+0#0000000#40ff4011|n|e| +0#0000001&@1| +0&#ffd7ff255|║| +0#0000000#ffffff0@32
|
|4| @31|║+0#0000001#ffd7ff255| |o+0(ff4011|n|e| @1| +0&#ffd7ff255|║| +0#0000000#ffffff0@32
|
||||||
|5| @31|║+0#0000001#ffd7ff255| |t|w|o| @2|║| +0#0000000#ffffff0@32
|
|5| @31|║+0#0000001#ffd7ff255| |t|w|o| @2|║| +0#0000000#ffffff0@32
|
||||||
|6| @31|║+0#0000001#ffd7ff255| |t|h|r|e@1| |║| +0#0000000#ffffff0@32
|
|6| @31|║+0#0000001#ffd7ff255| |t|h|r|e@1| |║| +0#0000000#ffffff0@32
|
||||||
|7| @31|╚+0#0000001#ffd7ff255|═@6|╝| +0#0000000#ffffff0@32
|
|7| @31|╚+0#0000001#ffd7ff255|═@6|╝| +0#0000000#ffffff0@32
|
||||||
|
@@ -249,11 +249,12 @@ func Test_popup_with_matches()
|
|||||||
\ '444 555 666',
|
\ '444 555 666',
|
||||||
\], #{line: 3, col: 10, border: []})
|
\], #{line: 3, col: 10, border: []})
|
||||||
set hlsearch
|
set hlsearch
|
||||||
|
hi VeryBlue ctermfg=blue guifg=blue
|
||||||
/666
|
/666
|
||||||
call matchadd('ErrorMsg', '111')
|
call matchadd('ErrorMsg', '111')
|
||||||
call matchadd('ErrorMsg', '444')
|
call matchadd('VeryBlue', '444')
|
||||||
call win_execute(winid, "call matchadd('ErrorMsg', '111')")
|
call win_execute(winid, "call matchadd('ErrorMsg', '111')")
|
||||||
call win_execute(winid, "call matchadd('ErrorMsg', '555')")
|
call win_execute(winid, "call matchadd('VeryBlue', '555')")
|
||||||
END
|
END
|
||||||
call writefile(lines, 'XtestPopupMatches')
|
call writefile(lines, 'XtestPopupMatches')
|
||||||
let buf = RunVimInTerminal('-S XtestPopupMatches', #{rows: 10})
|
let buf = RunVimInTerminal('-S XtestPopupMatches', #{rows: 10})
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2241,
|
||||||
/**/
|
/**/
|
||||||
2240,
|
2240,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user