summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 956ce44eb..9ae11a54b 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -9510,7 +9510,8 @@ compile_def_function(
}
}
}
- p = find_ex_command(&ea, NULL, starts_with_colon
+ p = find_ex_command(&ea, NULL,
+ starts_with_colon || (local_cmdmod.cmod_flags & CMOD_LEGACY)
? NULL : item_exists, &cctx);
if (p == NULL)