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:
committed by
Bram Moolenaar
parent
f240395fca
commit
04c4c5746e
@@ -2236,11 +2236,8 @@ parse_sort_uniq_args(typval_T *argvars, sortinfo_T *info)
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
// optional third argument: {dict}
|
||||
if (argvars[2].v_type != VAR_DICT)
|
||||
{
|
||||
emsg(_(e_dictionary_required));
|
||||
if (check_for_dict_arg(argvars, 2) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
info->item_compare_selfdict = argvars[2].vval.v_dict;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user