Mercurial > vim
diff runtime/doc/eval.txt @ 16517:9484fc00ac6b v8.1.1262
patch 8.1.1262: cannot simulate a mouse click in a test
commit https://github.com/vim/vim/commit/bb8476be871811e40ddc88c598d9e553aba7fb79
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 4 15:47:48 2019 +0200
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().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 04 May 2019 16:00:05 +0200 |
parents | 42910f306377 |
children | 5412fcd03ecb |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2700,6 +2700,7 @@ test_override({expr}, {val}) none test w 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}, {draggi 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