patch 9.0.0725: virtual text "after" wraps to next line when 'wrap' is off
Problem: Virtual text "after" wraps to next line even when 'wrap' is off
and 'list' is set.
Solution: Do not use the minimum width when 'wrap' is off. (issue #11336)
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 41d1609..9cdd0da 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3289,6 +3289,22 @@
text_padding_left: 1,
})
normal 2Gw
+ def g:ChangeText()
+ prop_clear(1)
+ set list
+ prop_add(1, 0, {
+ type: 'theprop',
+ text: 'just after txt '->repeat(3),
+ text_align: 'after',
+ text_padding_left: 2,
+ })
+ prop_add(1, 0, {
+ type: 'theprop',
+ text: 'in the middle '->repeat(4),
+ text_align: 'after',
+ text_padding_left: 1,
+ })
+ enddef
END
call writefile(lines, 'XTextAfterNowrap', 'D')
let buf = RunVimInTerminal('-S XTextAfterNowrap', #{rows: 8, cols: 60})
@@ -3303,6 +3319,10 @@
call term_sendkeys(buf, "$")
call VerifyScreenDump(buf, 'Test_text_after_nowrap_4', {})
+ call term_sendkeys(buf, "0")
+ call term_sendkeys(buf, ":call ChangeText()\<CR>")
+ call VerifyScreenDump(buf, 'Test_text_after_nowrap_5', {})
+
call StopVimInTerminal(buf)
endfunc