forked from aniani/vim
patch 9.0.0444: trying to declare g:variable gives confusing error
Problem: Trying to declare g:variable gives confusing error. Solution: Give a better error message. (closes #11108)
This commit is contained in:
@@ -3761,11 +3761,11 @@ find_ex_command(
|
||||
}
|
||||
}
|
||||
|
||||
// Recognize using a type for a w:, b:, t: or g: variable:
|
||||
// Recognize trying to use a type for a w:, b:, t: or g: variable:
|
||||
// "w:varname: number = 123".
|
||||
if (eap->cmd[1] == ':' && *p == ':')
|
||||
{
|
||||
eap->cmdidx = CMD_eval;
|
||||
eap->cmdidx = CMD_var;
|
||||
return eap->cmd;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user