diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-01 12:22:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-01 12:22:46 +0100 |
commit | d83392a43a48c566c0f3b76382a3648584dae32b (patch) | |
tree | ba5c2d376a386d524190fd0f7565c3af1b624701 /src/textprop.c | |
parent | e42c8dae32f3575557b83a371c4be66c09afbf7f (diff) |
patch 9.0.0345: error message for list argument could be clearerv9.0.0345
Problem: Error message for list argument could be clearer.
Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027)
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/textprop.c b/src/textprop.c index de3344f89c..5f5c6a2aa2 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -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")) |