diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 16:29:36 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 16:34:01 +0800 |
commit | d93b9062549662bfb9262967ac546291ccbc73be (patch) | |
tree | e076b35d34fe9a9f6edddc600af66a7254ceabf1 /src/nvim/eval | |
parent | 32810c0818bd0a602c8f790c3fcb1d67194978c8 (diff) | |
download | rneovim-d93b9062549662bfb9262967ac546291ccbc73be.tar.gz rneovim-d93b9062549662bfb9262967ac546291ccbc73be.tar.bz2 rneovim-d93b9062549662bfb9262967ac546291ccbc73be.zip |
vim-patch:8.2.4168: disallowing empty function name breaks existing plugins
Problem: Disallowing empty function name breaks existing plugins.
Solution: Allow empty function name in legacy script.
https://github.com/vim/vim/commit/e6a4200ff47708febcd7cb2b8c3dd3801a975d43
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/userfunc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 028d08692d..a37613dca9 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -1760,8 +1760,7 @@ 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 - || (end != NULL && end[-1] == AUTOLOAD_CHAR && *end == '(')) { + if (end == start) { if (!skip) { emsg(_("E129: Function name required")); } |