aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/mouse.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:40:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:40:31 +0000
commit339e2d15cc26fe86988ea06468d912a46c8d6f29 (patch)
treea6167fc8fcfc6ae2dc102f57b2473858eac34063 /test/old/testdir/mouse.vim
parent067dc73729267c0262438a6fdd66e586f8496946 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.gz
rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.bz2
rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.zip
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
Diffstat (limited to 'test/old/testdir/mouse.vim')
-rw-r--r--test/old/testdir/mouse.vim97
1 files changed, 97 insertions, 0 deletions
diff --git a/test/old/testdir/mouse.vim b/test/old/testdir/mouse.vim
new file mode 100644
index 0000000000..b9f1714dd9
--- /dev/null
+++ b/test/old/testdir/mouse.vim
@@ -0,0 +1,97 @@
+" Helper functions for generating mouse events
+
+let g:Ttymouse_values = ['sgr']
+let g:Ttymouse_dec = []
+let g:Ttymouse_netterm = []
+
+func MouseLeftClick(row, col)
+ call nvim_input_mouse('left', 'press', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseMiddleClick(row, col)
+ call nvim_input_mouse('middle', 'press', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseRightClick(row, col)
+ call nvim_input_mouse('right', 'press', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseCtrlLeftClick(row, col)
+ call nvim_input_mouse('left', 'press', 'C', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseCtrlRightClick(row, col)
+ call nvim_input_mouse('right', 'press', 'C', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseAltLeftClick(row, col)
+ call nvim_input_mouse('left', 'press', 'A', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseAltRightClick(row, col)
+ call nvim_input_mouse('right', 'press', 'A', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseLeftRelease(row, col)
+ call nvim_input_mouse('left', 'release', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseMiddleRelease(row, col)
+ call nvim_input_mouse('middle', 'release', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseRightRelease(row, col)
+ call nvim_input_mouse('right', 'release', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseLeftDrag(row, col)
+ call nvim_input_mouse('left', 'drag', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseWheelUp(row, col)
+ call nvim_input_mouse('wheel', 'up', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseWheelDown(row, col)
+ call nvim_input_mouse('wheel', 'down', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseWheelLeft(row, col)
+ call nvim_input_mouse('wheel', 'left', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+func MouseWheelRight(row, col)
+ call nvim_input_mouse('wheel', 'right', '', 0, a:row - 1, a:col - 1)
+ call getchar(1)
+ call feedkeys('', 'x!')
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab