0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0595: Vim9: not all commands using ends_excmd() tested

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.
This commit is contained in:
Bram Moolenaar
2020-04-18 19:53:28 +02:00
parent b6fb0516ec
commit a26b9700d7
10 changed files with 122 additions and 15 deletions

View File

@@ -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;