diff options
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump | 8 | ||||
-rw-r--r-- | src/testdir/test_textprop.vim | 40 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump b/src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump new file mode 100644 index 0000000000..d81456fff3 --- /dev/null +++ b/src/testdir/dumps/Test_virtual_text_overlap_with_highlight_1.dump @@ -0,0 +1,8 @@ +| +0#af5f00255#ffffff0@1|1| |o+0#0000000&|n|e| @52 +| +0#af5f00255&@1|2| |t+0#0000000&|w|o| @52 +| +0#af5f00255&@3|s+0#ffffff16#ff404010|y|n|t|a|x| |e|r@1|o|r| +0#0000000#ffffff0@43 +| +0#af5f00255&@1|3| >t+0#0000000&|h|r|e@1| @50 +| +0#af5f00255&@1|4| |f+0#0000000&|o|u|r+0#e000002&| +0#0000000&@40|o+0#ffffff16#ff404010|t|h|e|r| |e|r@1|o|r +| +0#af5f00255#ffffff0@1|5| |f+0#e000002&|i+0#0000000&|v|e| @51 +|~+0#4040ff13&| @58 +| +0#0000000&@41|3|,|1| @10|A|l@1| diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index 97fea60e6d..18ff3df2ee 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -4090,6 +4090,46 @@ func Test_text_below_nowrap() call StopVimInTerminal(buf) endfunc +func Test_virtual_text_overlap_with_highlight() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + setline(1, ['one', 'two', 'three', 'four', 'five']) + set number + + prop_type_add('demo_highlight_warning', {highlight: 'WarningMsg'}) + prop_type_add('demo_virtual_text_error', {highlight: 'Error'}) + + prop_add(2, 4, { + type: 'demo_highlight_warning', + end_col: 4, + }) + prop_add(2, 0, { + type: 'demo_virtual_text_error', + text: 'syntax error', + text_align: 'below', + }) + normal 2j + + prop_add(4, 4, { + type: 'demo_highlight_warning', + end_lnum: 5, + end_col: 1, + }) + prop_add(4, 0, { + type: 'demo_virtual_text_error', + text: 'other error', + text_align: 'right', + }) + END + call writefile(lines, 'XVirtualTextOverlapWithHighlight', 'D') + let buf = RunVimInTerminal('-S XVirtualTextOverlapWithHighlight', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_virtual_text_overlap_with_highlight_1', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_virtual_text_in_popup_highlight() CheckRunVimInTerminal |