diff runtime/doc/testing.txt @ 24982:4cb423b9250d v8.2.3028

patch 8.2.3028: GUI mouse events not tested Commit: https://github.com/vim/vim/commit/f1e7449d567c630601aa0cec6c663b791785a668 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Jun 21 18:44:26 2021 +0200 patch 8.2.3028: GUI mouse events not tested Problem: GUI mouse events not tested. Solution: Add test_gui_mouse_event(). Add mouse tests. Also add a few viminfo tests. (Yegappan Lakshmanan, closes #8407)
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Jun 2021 18:45:04 +0200
parents 5c98ea5f5d6e
children 496221916885
line wrap: on
line diff
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -1,4 +1,4 @@
-*testing.txt*	For Vim version 8.2.  Last change: 2021 Apr 02
+*testing.txt*	For Vim version 8.2.  Last change: 2021 Jun 21
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -78,6 +78,30 @@ test_getvalue({name})					*test_getvalue
 
 		Can also be used as a |method|: >
 			GetName()->test_getvalue()
+<
+						*test_gui_mouse_event()*
+test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
+		Inject a mouse button click event.  This function works only
+		when GUI is running.
+		The supported values for {button} are:
+			0	right mouse button
+			1	middle mouse button
+			2	left mouse button
+			3	mouse button release
+			4	scroll wheel down
+			5	scroll wheel up
+			6	scroll wheel left
+			7	scroll wheel right
+		{row} and {col} specify the location of the mouse click.
+		To inject a multiclick event, set {multiclick} to 1.
+		The supported values for {modifiers} are:
+			4	shift is pressed
+			8	alt is pressed
+			16	ctrl is pressed
+		After injecting the mouse event you probably should call
+		|feedkeys()| to have them processed, e.g.: >
+			call feedkeys("y", 'Lx!')
+
 
 test_ignore_error({expr})			 *test_ignore_error()*
 		Ignore any error containing {expr}.  A normal message is given