patch 9.0.1745: Missing test coverage for blockwise Visual highlight
Problem: Missing test coverage for blockwise Visual highlight with
virtual that starts with a double-width char.
Solution: Add a new virtual text to the test. Some other small fixes.
closes: #12835
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index d3a061d..da8c495 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2606,14 +2606,15 @@
CheckRunVimInTerminal
let lines =<< trim END
- call setline(1, repeat(['123456789'], 3))
+ call setline(1, repeat(['123456789'], 4))
call prop_type_add('theprop', #{highlight: 'Special'})
call prop_add(2, 2, {'type': 'theprop', 'text': '-口-'})
+ call prop_add(3, 3, {'type': 'theprop', 'text': '口'})
END
call writefile(lines, 'XscriptPropsVisualBlock', 'D')
let buf = RunVimInTerminal('-S XscriptPropsVisualBlock', #{rows: 6, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_inserts_text_visual_block_1', {})
- call term_sendkeys(buf, "\<C-V>2jl")
+ call term_sendkeys(buf, "\<C-V>3jl")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_visual_block_2', {})
call term_sendkeys(buf, "l")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_visual_block_3', {})