diff options
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regexp.c b/src/regexp.c index 8e6e9c440..1bd126169 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -1817,14 +1817,14 @@ static regsubmatch_T rsm; // can only be used when can_f_submatch is TRUE * call_func() by vim_regsub_both(). */ static int -fill_submatch_list(int argc UNUSED, typval_T *argv, int argskip, int argcount) +fill_submatch_list(int argc UNUSED, typval_T *argv, int argskip, ufunc_T *fp) { listitem_T *li; int i; char_u *s; typval_T *listarg = argv + argskip; - if (argcount == argskip) + if (!fp->uf_varargs && fp->uf_args.ga_len <= argskip) // called function doesn't take a submatches argument return argskip; |