comparison src/evalfunc.c @ 25294:c626fd34b66f v8.2.3184

patch 8.2.3184: cannot add a digraph with a leading space Commit: https://github.com/vim/vim/commit/6106504e9edc8500131f7a36e59bc146f90180fa Author: mityu <mityu.mail@gmail.com> Date: Mon Jul 19 20:07:21 2021 +0200 patch 8.2.3184: cannot add a digraph with a leading space Problem: Cannot add a digraph with a leading space. It is not easy to list existing digraphs. Solution: Add setdigraph(), setdigraphlist(), getdigraph() and getdigraphlist(). (closes #8580)
author Bram Moolenaar <Bram@vim.org>
date Mon, 19 Jul 2021 20:15:04 +0200
parents 712e867f9721
children 4d3c68196d05
comparison
equal deleted inserted replaced
25293:d3f443bd2edd 25294:c626fd34b66f
491 static argcheck_T arg1_list_or_dict[] = {arg_list_or_dict}; 491 static argcheck_T arg1_list_or_dict[] = {arg_list_or_dict};
492 static argcheck_T arg1_chan_or_job[] = {arg_chan_or_job}; 492 static argcheck_T arg1_chan_or_job[] = {arg_chan_or_job};
493 static argcheck_T arg2_float_or_nr[] = {arg_float_or_nr, arg_float_or_nr}; 493 static argcheck_T arg2_float_or_nr[] = {arg_float_or_nr, arg_float_or_nr};
494 static argcheck_T arg2_number[] = {arg_number, arg_number}; 494 static argcheck_T arg2_number[] = {arg_number, arg_number};
495 static argcheck_T arg2_string[] = {arg_string, arg_string}; 495 static argcheck_T arg2_string[] = {arg_string, arg_string};
496 static argcheck_T arg2_string_number[] = {arg_string, arg_number};
496 static argcheck_T arg2_list_nr[] = {arg_list_number, arg_list_number}; 497 static argcheck_T arg2_list_nr[] = {arg_list_number, arg_list_number};
497 static argcheck_T arg2_nr_string[] = {arg_number, arg_string}; 498 static argcheck_T arg2_nr_string[] = {arg_number, arg_string};
498 static argcheck_T arg2_dict_string[] = {arg_dict_any, arg_string}; 499 static argcheck_T arg2_dict_string[] = {arg_dict_any, arg_string};
499 static argcheck_T arg2_dict_string_or_nr[] = {arg_dict_any, arg_string_or_nr}; 500 static argcheck_T arg2_dict_string_or_nr[] = {arg_dict_any, arg_string_or_nr};
500 static argcheck_T arg2_string_dict[] = {arg_string, arg_dict_any}; 501 static argcheck_T arg2_string_dict[] = {arg_string, arg_dict_any};
582 } 583 }
583 static type_T * 584 static type_T *
584 ret_list_items(int argcount UNUSED, type_T **argtypes UNUSED) 585 ret_list_items(int argcount UNUSED, type_T **argtypes UNUSED)
585 { 586 {
586 return &t_list_list_any; 587 return &t_list_list_any;
588 }
589
590 static type_T *
591 ret_list_string_items(int argcount UNUSED, type_T **argtypes UNUSED)
592 {
593 return &t_list_list_string;
587 } 594 }
588 static type_T * 595 static type_T *
589 ret_dict_any(int argcount UNUSED, type_T **argtypes UNUSED) 596 ret_dict_any(int argcount UNUSED, type_T **argtypes UNUSED)
590 { 597 {
591 return &t_dict_any; 598 return &t_dict_any;
1105 ret_list_number, f_getcurpos}, 1112 ret_list_number, f_getcurpos},
1106 {"getcursorcharpos", 0, 1, FEARG_1, arg1_number, 1113 {"getcursorcharpos", 0, 1, FEARG_1, arg1_number,
1107 ret_list_number, f_getcursorcharpos}, 1114 ret_list_number, f_getcursorcharpos},
1108 {"getcwd", 0, 2, FEARG_1, arg2_number, 1115 {"getcwd", 0, 2, FEARG_1, arg2_number,
1109 ret_string, f_getcwd}, 1116 ret_string, f_getcwd},
1117 {"getdigraph", 1, 1, FEARG_1, arg1_string,
1118 ret_string, f_getdigraph},
1119 {"getdigraphlist", 0, 1, FEARG_1, arg1_number,
1120 ret_list_string_items, f_getdigraphlist},
1110 {"getenv", 1, 1, FEARG_1, arg1_string, 1121 {"getenv", 1, 1, FEARG_1, arg1_string,
1111 ret_any, f_getenv}, 1122 ret_any, f_getenv},
1112 {"getfontname", 0, 1, 0, arg1_string, 1123 {"getfontname", 0, 1, 0, arg1_string,
1113 ret_string, f_getfontname}, 1124 ret_string, f_getfontname},
1114 {"getfperm", 1, 1, FEARG_1, arg1_string, 1125 {"getfperm", 1, 1, FEARG_1, arg1_string,
1565 ret_void, f_setcharsearch}, 1576 ret_void, f_setcharsearch},
1566 {"setcmdpos", 1, 1, FEARG_1, arg1_number, 1577 {"setcmdpos", 1, 1, FEARG_1, arg1_number,
1567 ret_number_bool, f_setcmdpos}, 1578 ret_number_bool, f_setcmdpos},
1568 {"setcursorcharpos", 1, 3, FEARG_1, NULL, 1579 {"setcursorcharpos", 1, 3, FEARG_1, NULL,
1569 ret_number_bool, f_setcursorcharpos}, 1580 ret_number_bool, f_setcursorcharpos},
1581 {"setdigraph", 2, 2, FEARG_1, arg2_string_number,
1582 ret_bool, f_setdigraph},
1583 {"setdigraphlist", 1, 1, FEARG_1, arg1_list_string,
1584 ret_bool, f_setdigraphlist},
1570 {"setenv", 2, 2, FEARG_2, NULL, 1585 {"setenv", 2, 2, FEARG_2, NULL,
1571 ret_void, f_setenv}, 1586 ret_void, f_setenv},
1572 {"setfperm", 2, 2, FEARG_1, arg2_string, 1587 {"setfperm", 2, 2, FEARG_1, arg2_string,
1573 ret_number_bool, f_setfperm}, 1588 ret_number_bool, f_setfperm},
1574 {"setline", 2, 2, FEARG_2, arg2_setline, 1589 {"setline", 2, 2, FEARG_2, arg2_setline,