vim-patch:8.2.4163: no error for omitting function name after autoload prefix

Problem:    No error for omitting function name after autoload prefix.
Solution:   Check for missing function name. (issue vim/vim#9577)

2017d6f3b1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-12-04 16:28:59 +08:00
parent a0dd663c2d
commit 32810c0818

View File

@@ -1760,7 +1760,8 @@ char_u *trans_function_name(char **pp, bool skip, int flags, funcdict_T *fdp, pa
// Note that TFN_ flags use the same values as GLV_ flags.
end = (char_u *)get_lval((char *)start, NULL, &lv, false, skip, flags | GLV_READ_ONLY,
lead > 2 ? 0 : FNE_CHECK_START);
if (end == start) {
if (end == start
|| (end != NULL && end[-1] == AUTOLOAD_CHAR && *end == '(')) {
if (!skip) {
emsg(_("E129: Function name required"));
}