aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_edit.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-17 09:40:19 +0800
committerGitHub <noreply@github.com>2022-09-17 09:40:19 +0800
commit26b54d5c169d7d4afeb5433355b29eee78c12add (patch)
treea32d33168c7546b524f55fd16cc2b752199ff145 /src/nvim/testdir/test_edit.vim
parentc126c1f73a0bae3ac40ce460ef303348a671a08f (diff)
downloadrneovim-26b54d5c169d7d4afeb5433355b29eee78c12add.tar.gz
rneovim-26b54d5c169d7d4afeb5433355b29eee78c12add.tar.bz2
rneovim-26b54d5c169d7d4afeb5433355b29eee78c12add.zip
test(old): add a function roughly equivalent to test_setmouse() (#20224)
Mouse movement events usually have no effect, so passing "move" to nvim_input_mouse() works in most cases.
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
-rw-r--r--src/nvim/testdir/test_edit.vim8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim
index 679b877ef6..0025b93dc7 100644
--- a/src/nvim/testdir/test_edit.vim
+++ b/src/nvim/testdir/test_edit.vim
@@ -1228,15 +1228,11 @@ func Test_edit_MOUSE()
call assert_equal(24, line('w0'))
call assert_equal([0, 24, 2, 0], getpos('.'))
- " call test_setmouse(4, 3)
- call nvim_input_mouse('left', 'press', '', 0, 3, 2) " set mouse position
- call getchar() " discard mouse event but keep mouse position
+ call Ntest_setmouse(4, 3)
call feedkeys("A\<LeftMouse>\<esc>", 'tnix')
call assert_equal([0, 27, 2, 0], getpos('.'))
set mousemodel=extend
- " call test_setmouse(5, 3)
- call nvim_input_mouse('right', 'press', '', 0, 4, 2) " set mouse position
- call getchar() " discard mouse event but keep mouse position
+ call Ntest_setmouse(5, 3)
call feedkeys("A\<RightMouse>\<esc>\<esc>", 'tnix')
call assert_equal([0, 28, 2, 0], getpos('.'))
set mousemodel&