From d83392a43a48c566c0f3b76382a3648584dae32b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 1 Sep 2022 12:22:46 +0100 Subject: patch 9.0.0345: error message for list argument could be clearer Problem: Error message for list argument could be clearer. Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027) --- src/textprop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/textprop.c') diff --git a/src/textprop.c b/src/textprop.c index de3344f89..5f5c6a2aa 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")) -- cgit v1.2.1