mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4228: no tests for clicking in the GUI tabline
Problem: No tests for clicking in the GUI tabline. Solution: Add test functions to generate the events. Add tests using the functions. (Yegappan Lakshmanan, closes #9638)
This commit is contained in:
committed by
Bram Moolenaar
parent
e939f5ebba
commit
b0ad2d92fd
@@ -1337,6 +1337,40 @@ f_test_gui_mouse_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
|
||||
gui_send_mouse_event(button, TEXT_X(col - 1), TEXT_Y(row - 1), repeated_click, mods);
|
||||
# endif
|
||||
}
|
||||
|
||||
void
|
||||
f_test_gui_tabline_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
# ifdef FEAT_GUI
|
||||
int tabnr;
|
||||
|
||||
if (check_for_number_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
tabnr = tv_get_number(&argvars[0]);
|
||||
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = send_tabline_event(tabnr);
|
||||
# endif
|
||||
}
|
||||
|
||||
void
|
||||
f_test_gui_tabmenu_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
# ifdef FEAT_GUI
|
||||
int tabnr;
|
||||
int event;
|
||||
|
||||
if (check_for_number_arg(argvars, 0) == FAIL
|
||||
|| check_for_number_arg(argvars, 1) == FAIL)
|
||||
return;
|
||||
|
||||
tabnr = tv_get_number(&argvars[0]);
|
||||
event = tv_get_number(&argvars[1]);
|
||||
|
||||
send_tabline_menu_event(tabnr, event);
|
||||
# endif
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user