summaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/undo.c b/src/undo.c
index 171e817766..814130108e 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -3646,6 +3646,9 @@ u_eval_tree(u_header_T *first_uhp, list_T *list)
void
f_undofile(typval_T *argvars UNUSED, typval_T *rettv)
{
+ if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
+ return;
+
rettv->v_type = VAR_STRING;
#ifdef FEAT_PERSISTENT_UNDO
{