aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-03-18 00:47:46 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-04-13 12:00:31 -0400
commitdbb386e1b277004e37902fd1c794727277312765 (patch)
tree856b1b4ab481bcaf624cf3e73393d9f97d0b869f /src/nvim/eval.c
parent60a7184185a5656f723f17ab3d09157813baae13 (diff)
downloadrneovim-dbb386e1b277004e37902fd1c794727277312765.tar.gz
rneovim-dbb386e1b277004e37902fd1c794727277312765.tar.bz2
rneovim-dbb386e1b277004e37902fd1c794727277312765.zip
vim-patch:8.1.2280: crash when passing partial to substitute()
Problem: Crash when passing partial to substitute(). Solution: Take extra arguments into account. (closes vim/vim#5186) https://github.com/vim/vim/commit/b0745b221d284e381f1bd4b591cd68ea54b6a51d
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index dc20940166..7c7e9da8ac 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -6382,7 +6382,9 @@ call_func(
error = ERROR_DELETED;
} else if (fp != NULL) {
if (argv_func != NULL) {
- argcount = argv_func(argcount, argvars, fp->uf_args.ga_len);
+ // postponed filling in the arguments, do it now
+ argcount = argv_func(argcount, argvars, argv_clear,
+ fp->uf_args.ga_len);
}
if (fp->uf_flags & FC_RANGE) {
*doesrange = true;