diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-06-21 18:44:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-21 18:44:26 +0200 |
commit | f1e7449d567c630601aa0cec6c663b791785a668 (patch) | |
tree | b2c0247a651d4fc70af649b1951392d5acca9658 /src/testing.c | |
parent | 2ac4b2536a40e5cd75b4ff7a3d44a282d2f4f008 (diff) | |
download | vim-git-f1e7449d567c630601aa0cec6c663b791785a668.tar.gz |
patch 8.2.3028: GUI mouse events not testedv8.2.3028
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)
Diffstat (limited to 'src/testing.c')
-rw-r--r-- | src/testing.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testing.c b/src/testing.c index cded3c73a..9f5a2f5ac 100644 --- a/src/testing.c +++ b/src/testing.c @@ -1216,6 +1216,20 @@ f_test_setmouse(typval_T *argvars, typval_T *rettv UNUSED) } void +f_test_gui_mouse_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED) +{ +#ifdef FEAT_GUI + int button = tv_get_number(&argvars[0]); + int row = tv_get_number(&argvars[1]); + int col = tv_get_number(&argvars[2]); + int repeated_click = tv_get_number(&argvars[3]); + int_u mods = tv_get_number(&argvars[4]); + + gui_send_mouse_event(button, TEXT_X(col - 1), TEXT_Y(row - 1), repeated_click, mods); +#endif +} + + void f_test_settime(typval_T *argvars, typval_T *rettv UNUSED) { time_for_testing = (time_t)tv_get_number(&argvars[0]); |