1
0
forked from aniani/vim

patch 9.0.0335: checks for Dictionary argument often give a vague error

Problem:    Checks for Dictionary argument often give a vague error message.
Solution:   Give a useful error message. (Yegappan Lakshmanan, closes #11009)
This commit is contained in:
Yegappan Lakshmanan
2022-08-30 19:48:24 +01:00
committed by Bram Moolenaar
parent f240395fca
commit 04c4c5746e
32 changed files with 128 additions and 183 deletions

View File

@@ -2635,11 +2635,8 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED)
return;
is_abbr = (int)tv_get_bool(&argvars[1]);
if (argvars[2].v_type != VAR_DICT)
{
emsg(_(e_dictionary_required));
if (check_for_dict_arg(argvars, 2) == FAIL)
return;
}
d = argvars[2].vval.v_dict;
}
mode = get_map_mode_string(which, is_abbr);