vim-patch:partial:9.0.0359: error message for wrong argument type is not specific (#23315)

Problem:    Error message for wrong argument type is not specific.
Solution:   Include more information in the error. (Yegappan Lakshmanan,
            closes vim/vim#11037)

8deb2b30c7

Skip reduce() and deepcopy() changes because of missing patches.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-04-25 23:39:15 +08:00
committed by GitHub
parent ac9f8669a8
commit 7e0d668012
10 changed files with 79 additions and 45 deletions

View File

@@ -3466,8 +3466,7 @@ void f_getcompletion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
| WILD_NO_BEEP | WILD_HOME_REPLACE;
if (argvars[1].v_type != VAR_STRING) {
semsg(_(e_invarg2), "type must be a string");
if (tv_check_for_string_arg(argvars, 1) == FAIL) {
return;
}
const char *const type = tv_get_string(&argvars[1]);