summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-08-30 19:48:24 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-30 19:48:24 +0100
commit04c4c5746e15884768d2cb41370c3276a196cd4c (patch)
tree1e629820796635bd332b2066c03d548fad527f89 /src/map.c
parentf240395fca63d4b330112a4b81e94b05b50de1aa (diff)
patch 9.0.0335: checks for Dictionary argument often give a vague errorv9.0.0335
Problem: Checks for Dictionary argument often give a vague error message. Solution: Give a useful error message. (Yegappan Lakshmanan, closes #11009)
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/map.c b/src/map.c
index 3516f7ae24..f870b96831 100644
--- a/src/map.c
+++ b/src/map.c
@@ -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);