diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-04 15:47:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-04 15:47:48 +0200 |
commit | bb8476be871811e40ddc88c598d9e553aba7fb79 (patch) | |
tree | 9bcd94d557472209ff6ee9db7bb4b8af72b8b9a2 /runtime | |
parent | 25190db225d63e185e77e043e694ef455b3cf304 (diff) |
patch 8.1.1262: cannot simulate a mouse click in a testv8.1.1262
Problem: Cannot simulate a mouse click in a test.
Solution: Add test_setmouse().
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 8 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 8faf17f639..c12e69e4a1 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2700,6 +2700,7 @@ test_override({expr}, {val}) none test with Vim internal overrides 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 @@ test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()* 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 diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index c95dca66a7..cef6fd793a 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 8.1. Last change: 2019 Apr 06 +*usr_41.txt* For Vim version 8.1. Last change: 2019 May 04 VIM USER MANUAL - by Bram Moolenaar @@ -955,6 +955,7 @@ Testing: *test-functions* test_null_partial() return a null Partial function test_null_string() return a null String test_settime() set the time Vim uses internally + test_setmouse() set the mouse position test_feedinput() add key sequence to input buffer test_option_not_set() reset flag indicating option was set test_scrollbar() simulate scrollbar movement in the GUI |