0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0764: Vim9: assigning to option not fully tested

Problem:    Vim9: assigning to option not fully tested.
Solution:   Add more test cases. Allow using any type for assignment.
This commit is contained in:
Bram Moolenaar
2020-05-15 23:36:40 +02:00
parent 4457e1d98f
commit a6e67e4f41
4 changed files with 14 additions and 9 deletions

View File

@@ -1164,13 +1164,9 @@ call_def_function(
if (s == NULL)
s = (char_u *)"";
}
else if (tv->v_type == VAR_NUMBER)
n = tv->vval.v_number;
else
{
emsg(_("E1051: Expected string or number"));
goto failed;
}
// must be VAR_NUMBER, CHECKTYPE makes sure
n = tv->vval.v_number;
msg = set_option_value(iptr->isn_arg.storeopt.so_name,
n, s, iptr->isn_arg.storeopt.so_flags);
if (msg != NULL)