diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-07-23 05:04:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-23 05:04:16 +0100 |
commit | 81a3ff97e2012bdafc3ece796289f2e11e2754f3 (patch) | |
tree | 15226ff00df55bc1927e6ab0bed077e703314be9 /src/testing.c | |
parent | 5154a8880034b7bb94186d37bcecc6ee1a96f732 (diff) | |
download | vim-git-81a3ff97e2012bdafc3ece796289f2e11e2754f3.tar.gz |
patch 9.0.0058: Win32: cannot test low level eventsv9.0.0058
Problem: Win32: cannot test low level events.
Solution: Add "sendevent" to test_gui_event(). (Yegappan Lakshmanan,
closes #10679)
Diffstat (limited to 'src/testing.c')
-rw-r--r-- | src/testing.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testing.c b/src/testing.c index 66a3281d8..b1f632223 100644 --- a/src/testing.c +++ b/src/testing.c @@ -1500,6 +1500,12 @@ f_test_gui_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED) rettv->v_type = VAR_BOOL; rettv->vval.v_number = FALSE; + if (sandbox != 0) + { + emsg(_(e_not_allowed_in_sandbox)); + return; + } + if (check_for_string_arg(argvars, 0) == FAIL || check_for_dict_arg(argvars, 1) == FAIL || argvars[1].vval.v_dict == NULL) @@ -1520,6 +1526,10 @@ f_test_gui_event(typval_T *argvars UNUSED, typval_T *rettv UNUSED) rettv->vval.v_number = test_gui_tabline_event(argvars[1].vval.v_dict); else if (STRCMP(event, "tabmenu") == 0) rettv->vval.v_number = test_gui_tabmenu_event(argvars[1].vval.v_dict); +# ifdef FEAT_GUI_MSWIN + else if (STRCMP(event, "sendevent") == 0) + rettv->vval.v_number = test_gui_w32_sendevent(argvars[1].vval.v_dict); +# endif else { semsg(_(e_invalid_argument_str), event); |