1
0
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:
Bram Moolenaar
2022-09-11 15:14:05 +01:00
parent cce82a55b8
commit 9510d22463
9 changed files with 51 additions and 20 deletions

View File

@@ -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;
}
}