diff options
| author | Bram Moolenaar <Bram@vim.org> | 2022-09-30 19:19:04 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2022-09-30 19:19:04 +0100 |
| commit | cfb4d4f312e740c2fbb70c29c47cf74a76f8b605 (patch) | |
| tree | 72cdebc2780ff1e053637b5b820798be43a2532f /src/userfunc.c | |
| parent | a5d1a67bee5672786c4b172f66ae4391e7b0cc57 (diff) | |
| download | vim-git-9.0.0630.tar.gz | |
patch 9.0.0630: in Vim9 script a numbered function cannot be calledv9.0.0630
Problem: In Vim9 script a numbered function cannot be called.
Solution: Do not require "g:" before a numbered function name.
(closes #11254)
Diffstat (limited to 'src/userfunc.c')
| -rw-r--r-- | src/userfunc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 0f194d57e..92b5203c1 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -2095,7 +2095,8 @@ func_requires_g_prefix(ufunc_T *ufunc) { return ufunc->uf_name[0] != K_SPECIAL && (ufunc->uf_flags & FC_LAMBDA) == 0 - && vim_strchr(ufunc->uf_name, AUTOLOAD_CHAR) == NULL; + && vim_strchr(ufunc->uf_name, AUTOLOAD_CHAR) == NULL + && !isdigit(ufunc->uf_name[0]); } /* |
