diff options
Diffstat (limited to 'src/vim9expr.c')
-rw-r--r-- | src/vim9expr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vim9expr.c b/src/vim9expr.c index 18f29b6ae5..a8d88a2f28 100644 --- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -833,6 +833,14 @@ compile_call( } } + if (STRCMP(name, "writefile") == 0 && argcount > 2) + { + // May have the "D" flag, reserve a variable for a deferred + // function call. + if (get_defer_var_idx(cctx) == 0) + idx = -1; + } + if (idx >= 0) res = generate_BCALL(cctx, idx, argcount, argcount_init == 1); } |