0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.2.1573: Vim9: getreg() does not take "true" as argument

Problem:    Vim9: getreg() does not take "true" as argument.
Solution:   Use tv_get_bool_chk().  (closes #6820)
This commit is contained in:
Bram Moolenaar
2020-09-02 21:45:54 +02:00
parent 551d25e765
commit 67ff97ded7
3 changed files with 10 additions and 2 deletions

View File

@@ -3336,9 +3336,9 @@ f_getreg(typval_T *argvars, typval_T *rettv)
error = strregname == NULL;
if (argvars[1].v_type != VAR_UNKNOWN)
{
arg2 = (int)tv_get_number_chk(&argvars[1], &error);
arg2 = (int)tv_get_bool_chk(&argvars[1], &error);
if (!error && argvars[2].v_type != VAR_UNKNOWN)
return_list = (int)tv_get_number_chk(&argvars[2], &error);
return_list = (int)tv_get_bool_chk(&argvars[2], &error);
}
}
else