mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
vim-patch:7.4.298 #815
Problem: Can't have a funcref start with "t:". Solution: Add "t" to the list of accepted names. (Yukihiro Nakadaira) https://code.google.com/p/vim/source/detail?r=156f891d520e93eab5d3ce02784660fb13a3b0d3
This commit is contained in:

committed by
Justin M. Keyes

parent
59fc9e3aec
commit
937c78fe2e
@@ -16114,11 +16114,11 @@ var_check_func_name (
|
||||
int new_var /* TRUE when creating the variable */
|
||||
)
|
||||
{
|
||||
if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':')
|
||||
&& !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
|
||||
? name[2] : name[0])) {
|
||||
EMSG2(_("E704: Funcref variable name must start with a capital: %s"),
|
||||
name);
|
||||
// Allow for w: b: s: and t:.
|
||||
if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':')
|
||||
&& !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ? name[2]
|
||||
: name[0])) {
|
||||
EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
|
||||
return TRUE;
|
||||
}
|
||||
/* Don't allow hiding a function. When "v" is not NULL we might be
|
||||
|
Reference in New Issue
Block a user