Mercurial > vim
diff src/list.c @ 30015:adb0de8be4ce v9.0.0345
patch 9.0.0345: error message for list argument could be clearer
Commit: https://github.com/vim/vim/commit/d83392a43a48c566c0f3b76382a3648584dae32b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 1 12:22:46 2022 +0100
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 https://github.com/vim/vim/issues/11027)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 01 Sep 2022 13:30:05 +0200 |
parents | 6c1a9d7a931f |
children | 029c59bf78f1 |
line wrap: on
line diff
--- a/src/list.c +++ b/src/list.c @@ -1519,11 +1519,8 @@ f_join(typval_T *argvars, typval_T *rett || check_for_opt_string_arg(argvars, 1) == FAIL)) return; - if (argvars[0].v_type != VAR_LIST) - { - emsg(_(e_list_required)); + if (check_for_list_arg(argvars, 0) == FAIL) return; - } if (argvars[0].vval.v_list == NULL) return; @@ -1728,11 +1725,8 @@ f_list2str(typval_T *argvars, typval_T * || check_for_opt_bool_arg(argvars, 1) == FAIL)) return; - if (argvars[0].v_type != VAR_LIST) - { - emsg(_(e_invalid_argument)); + if (check_for_list_arg(argvars, 0) == FAIL) return; - } l = argvars[0].vval.v_list; if (l == NULL)