summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 72c26ce46..53dca8057 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -6484,8 +6484,15 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
cmdmod = save_cmdmod;
// Skip ":call" to get to the function name.
+ p = ea.cmd;
if (checkforcmd(&ea.cmd, "call", 3))
- ea.cmd = skipwhite(ea.cmd);
+ {
+ if (*ea.cmd == '(')
+ // not for "call()"
+ ea.cmd = p;
+ else
+ ea.cmd = skipwhite(ea.cmd);
+ }
if (!starts_with_colon)
{