1
0
forked from aniani/vim

patch 9.0.0480: cannot use a :def varargs function with substitute()

Problem:    Cannot use a :def varargs function with substitute().
Solution:   Use has_varargs(). (closes #11146)
This commit is contained in:
zeertzjq
2022-09-16 16:06:32 +01:00
committed by Bram Moolenaar
parent 1aea184a0d
commit abd58d8aee
3 changed files with 7 additions and 1 deletions

View File

@@ -1824,7 +1824,7 @@ fill_submatch_list(int argc UNUSED, typval_T *argv, int argskip, ufunc_T *fp)
char_u *s;
typval_T *listarg = argv + argskip;
if (!fp->uf_varargs && fp->uf_args.ga_len <= argskip)
if (!has_varargs(fp) && fp->uf_args.ga_len <= argskip)
// called function doesn't take a submatches argument
return argskip;