comparison src/evalfunc.c @ 19657:da791e5c0139 v8.2.0385

patch 8.2.0385: menu functionality insufficiently tested Commit: https://github.com/vim/vim/commit/0eabd4dc8ff50658f0ea0e92c7918a42242f6b80 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 15 16:13:53 2020 +0100 patch 8.2.0385: menu functionality insufficiently tested Problem: Menu functionality insufficiently tested. Solution: Add tests. Add menu_info(). (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5760)
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Mar 2020 16:15:04 +0100
parents 87379c82e9c9
children bc70c52c5c12
comparison
equal deleted inserted replaced
19656:df9b03a56543 19657:da791e5c0139
644 {"matchend", 2, 4, FEARG_1, ret_number, f_matchend}, 644 {"matchend", 2, 4, FEARG_1, ret_number, f_matchend},
645 {"matchlist", 2, 4, FEARG_1, ret_list_string, f_matchlist}, 645 {"matchlist", 2, 4, FEARG_1, ret_list_string, f_matchlist},
646 {"matchstr", 2, 4, FEARG_1, ret_string, f_matchstr}, 646 {"matchstr", 2, 4, FEARG_1, ret_string, f_matchstr},
647 {"matchstrpos", 2, 4, FEARG_1, ret_list_any, f_matchstrpos}, 647 {"matchstrpos", 2, 4, FEARG_1, ret_list_any, f_matchstrpos},
648 {"max", 1, 1, FEARG_1, ret_any, f_max}, 648 {"max", 1, 1, FEARG_1, ret_any, f_max},
649 {"menu_info", 1, 2, FEARG_1, ret_dict_any, f_menu_info},
649 {"min", 1, 1, FEARG_1, ret_any, f_min}, 650 {"min", 1, 1, FEARG_1, ret_any, f_min},
650 {"mkdir", 1, 3, FEARG_1, ret_number, f_mkdir}, 651 {"mkdir", 1, 3, FEARG_1, ret_number, f_mkdir},
651 {"mode", 0, 1, FEARG_1, ret_string, f_mode}, 652 {"mode", 0, 1, FEARG_1, ret_string, f_mode},
652 #ifdef FEAT_MZSCHEME 653 #ifdef FEAT_MZSCHEME
653 {"mzeval", 1, 1, FEARG_1, ret_any, f_mzeval}, 654 {"mzeval", 1, 1, FEARG_1, ret_any, f_mzeval},
2467 if (keys_esc != NULL) 2468 if (keys_esc != NULL)
2468 { 2469 {
2469 if (lowlevel) 2470 if (lowlevel)
2470 { 2471 {
2471 #ifdef USE_INPUT_BUF 2472 #ifdef USE_INPUT_BUF
2472 add_to_input_buf(keys, (int)STRLEN(keys)); 2473 int idx;
2474 int len = (int)STRLEN(keys);
2475
2476 for (idx = 0; idx < len; ++idx)
2477 {
2478 // if a CTRL-C was typed, set got_int
2479 if (keys[idx] == 3 && ctrl_c_interrupts)
2480 got_int = TRUE;
2481 else
2482 add_to_input_buf(keys + idx, 1);
2483 }
2473 #else 2484 #else
2474 emsg(_("E980: lowlevel input not supported")); 2485 emsg(_("E980: lowlevel input not supported"));
2475 #endif 2486 #endif
2476 } 2487 }
2477 else 2488 else