From 26b54d5c169d7d4afeb5433355b29eee78c12add Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 17 Sep 2022 09:40:19 +0800 Subject: 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. --- src/nvim/testdir/setup.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir/setup.vim') diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index 472ed4ca14..f895287469 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -45,6 +45,11 @@ mapclear! aunmenu * tlunmenu * +" roughly equivalent to test_setmouse() in Vim +func Ntest_setmouse(row, col) + call nvim_input_mouse('move', '', '', 0, a:row - 1, a:col - 1) +endfunc + " Prevent Nvim log from writing to stderr. let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log' -- cgit