diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-18 19:53:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-18 19:53:28 +0200 |
commit | a26b9700d73ebccd6c5459d0d66032a4249f6b72 (patch) | |
tree | 2b7c7a0dfe64a8c707f36ce107dab9660adca200 /src/vim9compile.c | |
parent | b6fb0516ec862a18fdffe06c9400d507a7193835 (diff) |
patch 8.2.0595: Vim9: not all commands using ends_excmd() testedv8.2.0595
Problem: Vim9: not all commands using ends_excmd() tested.
Solution: Find # comment after regular commands. Add more tests. Report
error for where it was caused.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index e8e8598e6c..64f7dd59b1 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2434,8 +2434,10 @@ compile_call(char_u **arg, size_t varlen, cctx_T *cctx, int argcount_init) } // If the name is a variable, load it and use PCALL. + // Not for g:Func(), we don't know if it is a variable or not. p = namebuf; - if (compile_load(&p, namebuf + varlen, cctx, FALSE) == OK) + if (STRNCMP(namebuf, "g:", 2) != 0 + && compile_load(&p, namebuf + varlen, cctx, FALSE) == OK) { res = generate_PCALL(cctx, argcount, FALSE); goto theend; |