mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.1937: missing test for mouse click + 'virtedit' (#25347)
Problem: missing test for mouse click + 'virtedit'
Solution: Add test for clicking after eol with 'virtualedit' and wrapped
line
closes: vim/vim#13157
46a0582ffa
This commit is contained in:
parent
9b8f65d03a
commit
9154fc76b7
@ -598,6 +598,9 @@ func Test_virtualedit_mouse()
|
||||
call Ntest_setmouse(row, 21 + 15)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
call assert_equal([0, 1, 10, 2, 15], getcurpos())
|
||||
call Ntest_setmouse(row, 21 + 20)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
call assert_equal([0, 1, 10, 7, 20], getcurpos())
|
||||
|
||||
setlocal nowrap
|
||||
call setline(2, repeat('a', 19))
|
||||
@ -654,6 +657,23 @@ func Test_virtualedit_mouse()
|
||||
sign undefine Sign1
|
||||
endif
|
||||
|
||||
wincmd h
|
||||
4wincmd >
|
||||
normal! gg24I.
|
||||
redraw
|
||||
call Ntest_setmouse(row + 1, 12)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
call assert_equal([0, 1, 24 + 9, 0, 24 + 12], getcurpos())
|
||||
call Ntest_setmouse(row + 1, 13)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
call assert_equal([0, 1, 24 + 10, 0, 24 + 13], getcurpos())
|
||||
call Ntest_setmouse(row + 1, 15)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
call assert_equal([0, 1, 24 + 10, 2, 24 + 15], getcurpos())
|
||||
call Ntest_setmouse(row + 1, 20)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
call assert_equal([0, 1, 24 + 10, 7, 24 + 20], getcurpos())
|
||||
|
||||
bwipe!
|
||||
let &mouse = save_mouse
|
||||
set virtualedit&
|
||||
|
Loading…
Reference in New Issue
Block a user