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_conceal.vim b/src/testdir/test_conceal.vim
index 09b986f..e977921 100644
--- a/src/testdir/test_conceal.vim
+++ b/src/testdir/test_conceal.vim
@@ -347,6 +347,10 @@
redraw
call assert_equal(['conceal click here '], ScreenLines(1, 20))
+ " click on the space between "this" and "click" puts cursor there
+ call test_setmouse(1, 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
" click on 'h' of "here" puts cursor there
call test_setmouse(1, 16)
call feedkeys("\<LeftMouse>", "tx")
@@ -373,6 +377,11 @@
call assert_equal([0, 1, 23, 0, 36], getcurpos())
set virtualedit=all
+ redraw
+ " click on the space between "this" and "click" puts cursor there
+ call test_setmouse(1, 9)
+ call feedkeys("\<LeftMouse>", "tx")
+ call assert_equal([0, 1, 13, 0, 13], getcurpos())
" click on 'h' of "here" puts cursor there
call test_setmouse(1, 16)
call feedkeys("\<LeftMouse>", "tx")