0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0359: error message for wrong argument type is not specific

Problem:    Error message for wrong argument type is not specific.
Solution:   Include more information in the error. (Yegappan Lakshmanan,
            closes #11037)
This commit is contained in:
Yegappan Lakshmanan
2022-09-02 15:15:27 +01:00
committed by Bram Moolenaar
parent 119167265e
commit 8deb2b30c7
17 changed files with 116 additions and 194 deletions

View File

@@ -2849,23 +2849,12 @@ f_sign_unplace(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = -1;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
if ((check_for_string_arg(argvars, 0) == FAIL
|| check_for_opt_dict_arg(argvars, 1) == FAIL))
return;
if (argvars[0].v_type != VAR_STRING)
{
emsg(_(e_invalid_argument));
return;
}
if (argvars[1].v_type != VAR_UNKNOWN)
{
if (check_for_dict_arg(argvars, 1) == FAIL)
return;
dict = argvars[1].vval.v_dict;
}
rettv->vval.v_number = sign_unplace_from_dict(&argvars[0], dict);
}