diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-12 14:21:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-12 14:21:11 +0200 |
commit | 575f24b3f3d8cd8bfc2da402c2938c0c7ace7877 (patch) | |
tree | e8b8828ac41f96f8205d08935bcc2223dd1f2c8e /src/vim9compile.c | |
parent | 040f975fc1de14ada5e0a7324bb5e51e461be2dd (diff) | |
download | vim-git-8.2.1425.tar.gz |
patch 8.2.1425: Vim9: cannot use call() without :callv8.2.1425
Problem: Vim9: cannot use call() without :call.
Solution: Do not skip over "call(". (closes #6689)
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 9 |
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) { |