aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-16 19:40:52 +0800
committerGitHub <noreply@github.com>2022-09-16 19:40:52 +0800
commit622968d7b389b8334ee2f2550c3a00018c4f1879 (patch)
treeda7c99dd4cc41e3fe6e3ffecdfc7e5f6de4285f8 /src/nvim/eval
parent3dda52d860eb4937127693d4660db18305069370 (diff)
downloadrneovim-622968d7b389b8334ee2f2550c3a00018c4f1879.tar.gz
rneovim-622968d7b389b8334ee2f2550c3a00018c4f1879.tar.bz2
rneovim-622968d7b389b8334ee2f2550c3a00018c4f1879.zip
vim-patch:9.0.0476: varargs does not work for replacement function of substitute() (#20216)
Problem: Varargs does not work for replacement function of substitute(). Solution: Check the varargs flag of the function. (closes vim/vim#11142) https://github.com/vim/vim/commit/48db5dafecacced4a9e42de3f92838b2d59beb4c
Diffstat (limited to 'src/nvim/eval')
-rw-r--r--src/nvim/eval/userfunc.c3
-rw-r--r--src/nvim/eval/userfunc.h4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 6b0c9069fa..30814a8d35 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -1529,8 +1529,7 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
} else if (fp != NULL) {
if (funcexe->fe_argv_func != NULL) {
// postponed filling in the arguments, do it now
- argcount = funcexe->fe_argv_func(argcount, argvars, argv_clear,
- fp->uf_args.ga_len);
+ argcount = funcexe->fe_argv_func(argcount, argvars, argv_clear, fp);
}
argv_add_base(funcexe->fe_basetv, &argvars, &argcount, argv, &argv_base);
diff --git a/src/nvim/eval/userfunc.h b/src/nvim/eval/userfunc.h
index 06c9500f92..4098622a14 100644
--- a/src/nvim/eval/userfunc.h
+++ b/src/nvim/eval/userfunc.h
@@ -50,8 +50,8 @@ typedef enum {
} FnameTransError;
/// Used in funcexe_T. Returns the new argcount.
-typedef int (*ArgvFunc)(int current_argcount, typval_T *argv, int argskip,
- int called_func_argcount);
+typedef int (*ArgvFunc)(int current_argcount, typval_T *argv, int partial_argcount,
+ ufunc_T *called_func);
/// Structure passed between functions dealing with function call execution.
typedef struct {