patch 8.1.1262: cannot simulate a mouse click in a test
Problem: Cannot simulate a mouse click in a test.
Solution: Add test_setmouse().
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 8faf17f..c12e69e 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2700,6 +2700,7 @@
test_refcount({expr}) Number get the reference count of {expr}
test_scrollbar({which}, {value}, {dragging})
none scroll in the GUI for testing
+test_setmouse({row}, {col}) none set the mouse position for testing
test_settime({expr}) none set current time for testing
timer_info([{id}]) List information about timers
timer_pause({id}, {pause}) none pause or unpause a timer
@@ -9841,6 +9842,13 @@
Only works when the {which} scrollbar actually exists,
obviously only when using the GUI.
+test_setmouse({row}, {col}) *test_setmouse()*
+ Set the mouse position to be used for the next mouse action.
+ {row} and {col} are one based.
+ For example: >
+ call test_setmouse(4, 20)
+ call feedkeys("\<LeftMouse>", "xt")
+
test_settime({expr}) *test_settime()*
Set the time Vim uses internally. Currently only used for
timestamps in the history, as they are used in viminfo, and