patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'
Problem: A "below" aligned text property does not work with 'nowrap'.
Solution: Start a new screen line to display the virtual text.
(closes #10851)
diff --git a/src/testdir/dumps/Test_prop_with_text_after_nowrap_1.dump b/src/testdir/dumps/Test_prop_with_text_after_nowrap_1.dump
new file mode 100644
index 0000000..3f5083d
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_with_text_after_nowrap_1.dump
@@ -0,0 +1,8 @@
+|o+0&#ffffff0|n|e| @56
+| +0#ffffff16#e000002|B|e|l|o|w| |t|h|e| |l|i|n|e| | +0#0000000#ffffff0@43
+|t|w|o| @56
+|a+0&#ffff4012|n|o|t|h|e|r| +0&#ffffff0@52
+|O+0#ffffff16#e000002|n|e| |M|o|r|e| |H|e|r|e| +0#0000000#ffffff0@46
+|t|h|r|e>e| @54
+|~+0#4040ff13&| @58
+| +0#0000000&@41|3|,|5| @10|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 9bb3713..0ecac6d 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2426,6 +2426,27 @@
call delete('XscriptPropsWithTextAfterWraps')
endfunc
+func Test_props_with_text_after_nowrap()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ set nowrap
+ call setline(1, ['one', 'two', 'three'])
+ call prop_type_add('belowprop', #{highlight: 'ErrorMsg'})
+ call prop_type_add('anotherprop', #{highlight: 'Search'})
+ call prop_add(1, 0, #{type: 'belowprop', text: ' Below the line ', text_align: 'below'})
+ call prop_add(2, 0, #{type: 'anotherprop', text: 'another', text_align: 'below'})
+ call prop_add(2, 0, #{type: 'belowprop', text: 'One More Here', text_align: 'below'})
+ normal G$
+ END
+ call writefile(lines, 'XscriptPropsAfterNowrap')
+ let buf = RunVimInTerminal('-S XscriptPropsAfterNowrap', #{rows: 8, cols: 60})
+ call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_1', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XscriptPropsAfterNowrap')
+endfunc
+
func Test_removed_prop_with_text_cleans_up_array()
new
call setline(1, 'some text here')