diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-08-30 19:48:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-30 19:48:24 +0100 |
commit | 04c4c5746e15884768d2cb41370c3276a196cd4c (patch) | |
tree | 1e629820796635bd332b2066c03d548fad527f89 /src/map.c | |
parent | f240395fca63d4b330112a4b81e94b05b50de1aa (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.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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); |