summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_normal.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-17 22:35:26 +0200
committerChristian Brabandt <cb@256bit.org>2023-08-17 22:35:26 +0200
commite500ae8e29ad921378085f5d70ee5c0c537be1ba (patch)
treeb0359471c2dd4bb6920edc9b98107e3730eff8a9 /src/testdir/test_normal.vim
parent2261c89a49ff2115e1ccc9ab9211e9f0d5a37578 (diff)
patch 9.0.1725: cursor pos wrong after concealed text with 'virtualedit'v9.0.1725
Problem: Wrong cursor position when clicking after concealed text with 'virtualedit'. Solution: Store virtual columns in ScreenCols[] instead of text columns, and always use coladvance() when clicking. This also fixes incorrect curswant when clicking on a TAB, so now Test_normal_click_on_ctrl_char() asserts the same results as the ones before patch 9.0.0048. closes: #12808 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r--src/testdir/test_normal.vim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index c4d6ef6dde..e9478fab76 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4049,13 +4049,13 @@ func Test_normal_click_on_ctrl_char()
call assert_equal([0, 1, 1, 0, 1], getcurpos())
call test_setmouse(1, 2)
call feedkeys("\<LeftMouse>", 'xt')
- call assert_equal([0, 1, 2, 0, 8], getcurpos())
+ call assert_equal([0, 1, 2, 0, 2], getcurpos())
call test_setmouse(1, 3)
call feedkeys("\<LeftMouse>", 'xt')
- call assert_equal([0, 1, 2, 0, 8], getcurpos())
+ call assert_equal([0, 1, 2, 0, 3], getcurpos())
call test_setmouse(1, 7)
call feedkeys("\<LeftMouse>", 'xt')
- call assert_equal([0, 1, 2, 0, 8], getcurpos())
+ call assert_equal([0, 1, 2, 0, 7], getcurpos())
call test_setmouse(1, 8)
call feedkeys("\<LeftMouse>", 'xt')
call assert_equal([0, 1, 2, 0, 8], getcurpos())
@@ -4067,13 +4067,13 @@ func Test_normal_click_on_ctrl_char()
call assert_equal([0, 1, 4, 0, 10], getcurpos())
call test_setmouse(1, 11)
call feedkeys("\<LeftMouse>", 'xt')
- call assert_equal([0, 1, 4, 0, 10], getcurpos())
+ call assert_equal([0, 1, 4, 0, 11], getcurpos())
call test_setmouse(1, 12)
call feedkeys("\<LeftMouse>", 'xt')
call assert_equal([0, 1, 5, 0, 12], getcurpos())
call test_setmouse(1, 13)
call feedkeys("\<LeftMouse>", 'xt')
- call assert_equal([0, 1, 5, 0, v:maxcol], getcurpos())
+ call assert_equal([0, 1, 5, 0, 13], getcurpos())
bwipe!
let &mouse = save_mouse