mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3031: no error if a function name starts with an underscore
Problem: No error if a function name starts with an underscore. (Naohiro Ono) Solution: In Vim9 script disallow a function name starting with an underscore, as is mentioned in the help. (closes #8414)
This commit is contained in:
@@ -3595,7 +3595,8 @@ trans_function_name(
|
||||
lead += (int)STRLEN(sid_buf);
|
||||
}
|
||||
}
|
||||
else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len))
|
||||
else if (!(flags & TFN_INT) && (builtin_function(lv.ll_name, len)
|
||||
|| (in_vim9script() && *lv.ll_name == '_')))
|
||||
{
|
||||
semsg(_("E128: Function name must start with a capital or \"s:\": %s"),
|
||||
start);
|
||||
|
Reference in New Issue
Block a user