summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_textprop.vim
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/testdir/test_textprop.vim
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/testdir/test_textprop.vim')
-rw-r--r--src/testdir/test_textprop.vim44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 1bd115b4e3..c03c5b3fb7 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -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