1
0
forked from aniani/vim

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

@@ -2706,6 +2706,17 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL);
if (*name != NUL)
s = NULL;
else if (trans_name != NULL
&& ASCII_ISUPPER(*s)
&& current_sctx.sc_version == SCRIPT_VERSION_VIM9
&& find_func(trans_name, NULL) == NULL)
{
// With Vim9 script "MyFunc" can be script-local to the current
// script or global. The script-local name is not found, assume
// global.
vim_free(trans_name);
trans_name = vim_strsave(s);
}
}
if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))