forked from aniani/vim
patch 9.0.0894: virtual text property highlight ignores window background
Problem: Virtual text property highlight ignores window background.
Solution: Combine text prop attribute with win_attr into extra_attr.
(closes #11462)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
> +0&#ffffff0@74
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @17| +0#0000001#ffd7ff255@16| +0#4040ff13#ffffff0@38
|
||||
|~| @17| +0#0000001#ffd7ff255| +0#0000e05&|+| |S+0#0000001&|o|m|e| | +0#4040ff13#afffff255|x| |t+0#0000001#ffd7ff255|e|x|t| | +0#4040ff13#ffffff0@38
|
||||
|~| @17| +0#0000001#ffd7ff255@16| +0#4040ff13#ffffff0@38
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|0|,|0|-|1| @8|A|l@1|
|
||||
@@ -3422,6 +3422,50 @@ func Test_text_below_nowrap()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_virtual_text_in_popup_highlight()
|
||||
CheckRunVimInTerminal
|
||||
|
||||
let lines =<< trim END
|
||||
vim9script
|
||||
|
||||
# foreground highlight only, popup background is used
|
||||
prop_type_add('Prop1', {'highlight': 'SpecialKey'})
|
||||
# foreground and background highlight, popup background is not used
|
||||
prop_type_add('Prop2', {'highlight': 'DiffDelete'})
|
||||
|
||||
var popupText = [{
|
||||
text: 'Some text',
|
||||
props: [
|
||||
{
|
||||
col: 1,
|
||||
type: 'Prop1',
|
||||
text: ' + '
|
||||
},
|
||||
{
|
||||
col: 6,
|
||||
type: 'Prop2',
|
||||
text: ' x '
|
||||
},
|
||||
]
|
||||
}]
|
||||
var popupArgs = {
|
||||
line: 3,
|
||||
col: 20,
|
||||
maxwidth: 80,
|
||||
highlight: 'PMenu',
|
||||
border: [],
|
||||
borderchars: [' '],
|
||||
}
|
||||
|
||||
popup_create(popupText, popupArgs)
|
||||
END
|
||||
call writefile(lines, 'XscriptVirtualHighlight', 'D')
|
||||
let buf = RunVimInTerminal('-S XscriptVirtualHighlight', #{rows: 8})
|
||||
call VerifyScreenDump(buf, 'Test_virtual_text_in_popup_highlight_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_insert_text_change_arg()
|
||||
CheckRunVimInTerminal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user