diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-09-17 09:40:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-17 09:40:19 +0800 |
| commit | 26b54d5c169d7d4afeb5433355b29eee78c12add (patch) | |
| tree | a32d33168c7546b524f55fd16cc2b752199ff145 /src/nvim/testdir/setup.vim | |
| parent | c126c1f73a0bae3ac40ce460ef303348a671a08f (diff) | |
| download | rneovim-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/setup.vim')
| -rw-r--r-- | src/nvim/testdir/setup.vim | 5 |
1 files changed, 5 insertions, 0 deletions
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' |