aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-25 23:39:15 +0800
committerGitHub <noreply@github.com>2023-04-25 23:39:15 +0800
commit7e0d66801297677ecbb6b35d0c9139e672920be4 (patch)
tree74a2df0aa302d7d0b6b1084b4f54a365c0b0205b /src/nvim/cmdexpand.c
parentac9f8669a8e4bd0cf13468d316d1746be65d3cdc (diff)
downloadrneovim-7e0d66801297677ecbb6b35d0c9139e672920be4.tar.gz
rneovim-7e0d66801297677ecbb6b35d0c9139e672920be4.tar.bz2
rneovim-7e0d66801297677ecbb6b35d0c9139e672920be4.zip
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) https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b Skip reduce() and deepcopy() changes because of missing patches. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index a400be6039..5f135ff7b0 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -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]);