diff options
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 71cab0a308..f5761f958c 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -4012,10 +4012,12 @@ var_wrong_func_name( { // Allow for w: b: s: and t:. In Vim9 script s: is not allowed, because // the name can be used without the s: prefix. + // Allow autoload variable. if (!((vim_strchr((char_u *)"wbt", name[0]) != NULL || (!in_vim9script() && name[0] == 's')) && name[1] == ':') && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') - ? name[2] : name[0])) + ? name[2] : name[0]) + && vim_strchr(name, '#') == NULL) { semsg(_(e_funcref_variable_name_must_start_with_capital_str), name); return TRUE; |