diff options
author | porygonisaduck <alvaradx@umich.edu> | 2022-11-27 20:55:05 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-27 20:55:05 +0000 |
commit | 38854b565acba39eff36cf3c6396c911bf072bdc (patch) | |
tree | 229cef2a1c8e951af16695927d80c4bb9fbdffd8 /src/testdir/test_textprop.vim | |
parent | 3da8597fc07505c0f8839b0834aafe1c10ffb456 (diff) |
patch 9.0.0962: virtual text below cannot be placed below empty linesv9.0.0962
Problem: Virtual text below cannot be placed below empty lines.
Solution: Add one character. (James Alvarado, closes #11606, closes #11520)
Diffstat (limited to 'src/testdir/test_textprop.vim')
-rw-r--r-- | src/testdir/test_textprop.vim | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index 3f24463c18..a6ed0af252 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2714,6 +2714,39 @@ func Test_props_with_text_after_below_trunc() call StopVimInTerminal(buf) endfunc +func Test_prop_with_text_below_after_empty() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + + setline(1, ['vim9script', '', 'three', '']) + + # Add text prop below empty line 2 with padding. + prop_type_add('test', {highlight: 'ErrorMsg'}) + prop_add(2, 0, { + type: 'test', + text: 'The quick brown fox jumps over the lazy dog', + text_align: 'below', + text_padding_left: 1, + }) + + # Add text prop below empty line 4 without padding. + prop_type_add('other', {highlight: 'DiffChange'}) + prop_add(4, 0, { + type: 'other', + text: 'The slow fox bumps into the lazy dog', + text_align: 'below', + text_padding_left: 0, + }) + END + call writefile(lines, 'XscriptPropBelowAfterEmpty', 'D') + let buf = RunVimInTerminal('-S XscriptPropBelowAfterEmpty', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_below_after_empty_1', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_prop_with_text_below_after_match() CheckRunVimInTerminal |