0
0
mirror of https://github.com/vim/vim.git synced 2025-10-15 07:14:09 -04:00

patch 8.2.0385: menu functionality insufficiently tested

Problem:    Menu functionality insufficiently tested.
Solution:   Add tests.  Add menu_info(). (Yegappan Lakshmanan, closes #5760)
This commit is contained in:
Bram Moolenaar
2020-03-15 16:13:53 +01:00
parent 5e4d1eba95
commit 0eabd4dc8f
10 changed files with 721 additions and 31 deletions

View File

@@ -646,6 +646,7 @@ static funcentry_T global_functions[] =
{"matchstr", 2, 4, FEARG_1, ret_string, f_matchstr},
{"matchstrpos", 2, 4, FEARG_1, ret_list_any, f_matchstrpos},
{"max", 1, 1, FEARG_1, ret_any, f_max},
{"menu_info", 1, 2, FEARG_1, ret_dict_any, f_menu_info},
{"min", 1, 1, FEARG_1, ret_any, f_min},
{"mkdir", 1, 3, FEARG_1, ret_number, f_mkdir},
{"mode", 0, 1, FEARG_1, ret_string, f_mode},
@@ -2469,7 +2470,17 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
if (lowlevel)
{
#ifdef USE_INPUT_BUF
add_to_input_buf(keys, (int)STRLEN(keys));
int idx;
int len = (int)STRLEN(keys);
for (idx = 0; idx < len; ++idx)
{
// if a CTRL-C was typed, set got_int
if (keys[idx] == 3 && ctrl_c_interrupts)
got_int = TRUE;
else
add_to_input_buf(keys + idx, 1);
}
#else
emsg(_("E980: lowlevel input not supported"));
#endif