neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 32810c0818bd0a602c8f790c3fcb1d67194978c8
parent a0dd663c2d321ce107aa07005aa01b9c341c5df2
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Sun,  4 Dec 2022 16:28:59 +0800

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)

https://github.com/vim/vim/commit/2017d6f3b1d523204e5471e941cfa687b4da0058

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Msrc/nvim/eval/userfunc.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c @@ -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")); }