patch 9.0.0962: virtual text below cannot be placed below empty lines
Problem: Virtual text below cannot be placed below empty lines.
Solution: Add one character. (James Alvarado, closes #11606, closes #11520)
diff --git a/src/testdir/dumps/Test_prop_below_after_empty_1.dump b/src/testdir/dumps/Test_prop_below_after_empty_1.dump
new file mode 100644
index 0000000..b6773df
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_below_after_empty_1.dump
@@ -0,0 +1,8 @@
+>v+0&#ffffff0|i|m|9|s|c|r|i|p|t| @49
+@60
+@1|T+0#ffffff16#e000002|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g| +0#0000000#ffffff0@15
+|t|h|r|e@1| @54
+@60
+|T+0&#ffd7ff255|h|e| |s|l|o|w| |f|o|x| |b|u|m|p|s| |i|n|t|o| |t|h|e| |l|a|z|y| |d|o|g| +0&#ffffff0@23
+|~+0#4040ff13&| @58
+| +0#0000000&@41|1|,|1| @10|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 3f24463..a6ed0af 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2714,6 +2714,39 @@
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