comparison src/evalfunc.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 fd855ad74887
comparison
equal deleted inserted replaced
30014:3fb163e2ef6c 30015:adb0de8be4ce
3233 && (check_for_string_or_func_arg(argvars, 0) == FAIL 3233 && (check_for_string_or_func_arg(argvars, 0) == FAIL
3234 || check_for_list_arg(argvars, 1) == FAIL 3234 || check_for_list_arg(argvars, 1) == FAIL
3235 || check_for_opt_dict_arg(argvars, 2) == FAIL)) 3235 || check_for_opt_dict_arg(argvars, 2) == FAIL))
3236 return; 3236 return;
3237 3237
3238 if (argvars[1].v_type != VAR_LIST) 3238 if (check_for_list_arg(argvars, 1) == FAIL)
3239 { 3239 return;
3240 emsg(_(e_list_required));
3241 return;
3242 }
3243 if (argvars[1].vval.v_list == NULL) 3240 if (argvars[1].vval.v_list == NULL)
3244 return; 3241 return;
3245 3242
3246 if (argvars[0].v_type == VAR_FUNC) 3243 if (argvars[0].v_type == VAR_FUNC)
3247 func = argvars[0].vval.v_string; 3244 func = argvars[0].vval.v_string;