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

patch 9.0.0345: error message for list argument could be clearer

Problem:    Error message for list argument could be clearer.
Solution:   Include the argument number. (Yegappan Lakshmanan, closes #11027)
This commit is contained in:
Bram Moolenaar
2022-09-01 12:22:46 +01:00
parent e42c8dae32
commit d83392a43a
22 changed files with 63 additions and 68 deletions

View File

@@ -348,11 +348,8 @@ f_prop_add_list(typval_T *argvars, typval_T *rettv UNUSED)
|| check_for_list_arg(argvars, 1) == FAIL)
return;
if (argvars[1].vval.v_list == NULL)
{
emsg(_(e_list_required));
if (check_for_nonnull_list_arg(argvars, 1) == FAIL)
return;
}
dict = argvars[0].vval.v_dict;
if (dict == NULL || !dict_has_key(dict, "type"))