diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-21 10:32:58 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-21 10:32:58 +0000 |
commit | e6a4200ff47708febcd7cb2b8c3dd3801a975d43 (patch) | |
tree | 9405f2a62c629e1a586e79a9ba2c2f056a9130be /src/userfunc.c | |
parent | dd5893be34649482ed62525430fb8baa1ec273ce (diff) | |
download | vim-git-e6a4200ff47708febcd7cb2b8c3dd3801a975d43.tar.gz |
patch 8.2.4168: disallowing empty function name breaks existing pluginsv8.2.4168
Problem: Disallowing empty function name breaks existing plugins.
Solution: Allow empty function name in legacy script.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 5de5dd00f..223535fdb 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -3693,8 +3693,8 @@ trans_function_name( // Note that TFN_ flags use the same values as GLV_ flags. end = get_lval(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 || (in_vim9script() && end != NULL + && end[-1] == AUTOLOAD_CHAR && *end == '(')) { if (!skip) emsg(_(e_function_name_required)); |