aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_mapping.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_mapping.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_mapping.vim')
-rw-r--r--src/nvim/testdir/test_mapping.vim10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim
index e1d0b9a9ba..72c84b5356 100644
--- a/src/nvim/testdir/test_mapping.vim
+++ b/src/nvim/testdir/test_mapping.vim
@@ -1006,15 +1006,14 @@ func Test_plug_remap()
endfunc
func Test_mouse_drag_mapped_start_select()
- CheckFunction test_setmouse
set mouse=a
set selectmode=key,mouse
func ClickExpr()
- call test_setmouse(1, 1)
+ call Ntest_setmouse(1, 1)
return "\<LeftMouse>"
endfunc
func DragExpr()
- call test_setmouse(1, 2)
+ call Ntest_setmouse(1, 2)
return "\<LeftDrag>"
endfunc
nnoremap <expr> <F2> ClickExpr()
@@ -1036,14 +1035,13 @@ endfunc
" Test for mapping <LeftDrag> in Insert mode
func Test_mouse_drag_insert_map()
- CheckFunction test_setmouse
set mouse=a
func ClickExpr()
- call test_setmouse(1, 1)
+ call Ntest_setmouse(1, 1)
return "\<LeftMouse>"
endfunc
func DragExpr()
- call test_setmouse(1, 2)
+ call Ntest_setmouse(1, 2)
return "\<LeftDrag>"
endfunc
inoremap <expr> <F2> ClickExpr()