1
0
forked from aniani/vim

patch 8.2.2957: using getchar() in Vim9 script is problematic

Problem:    Using getchar() in Vim9 script is problematic.
Solution:   Add getcharstr(). (closes #8343)
This commit is contained in:
Bram Moolenaar
2021-06-07 18:29:17 +02:00
parent f05d2fc539
commit 3a7503c34c
6 changed files with 70 additions and 5 deletions

View File

@@ -945,13 +945,15 @@ static funcentry_T global_functions[] =
{"getchangelist", 0, 1, FEARG_1, NULL,
ret_list_any, f_getchangelist},
{"getchar", 0, 1, 0, NULL,
ret_number, f_getchar},
ret_any, f_getchar},
{"getcharmod", 0, 0, 0, NULL,
ret_number, f_getcharmod},
{"getcharpos", 1, 1, FEARG_1, NULL,
ret_list_number, f_getcharpos},
{"getcharsearch", 0, 0, 0, NULL,
ret_dict_any, f_getcharsearch},
{"getcharstr", 0, 1, 0, NULL,
ret_string, f_getcharstr},
{"getcmdline", 0, 0, 0, NULL,
ret_string, f_getcmdline},
{"getcmdpos", 0, 0, 0, NULL,