forked from aniani/vim
patch 8.2.4589: cannot index the g: dictionary
Problem: Cannot index the g: dictionary. Solution: Recognize using "g:[key]". (closes #9969)
This commit is contained in:
@@ -3523,12 +3523,14 @@ find_ex_command(
|
||||
return eap->cmd;
|
||||
}
|
||||
|
||||
if (p != eap->cmd && (
|
||||
if ((p != eap->cmd && (
|
||||
// "varname[]" is an expression.
|
||||
*p == '['
|
||||
// "varname.key" is an expression.
|
||||
|| (*p == '.' && (ASCII_ISALPHA(p[1])
|
||||
|| p[1] == '_'))))
|
||||
|| (*p == '.'
|
||||
&& (ASCII_ISALPHA(p[1]) || p[1] == '_'))))
|
||||
// g:[key] is an expression
|
||||
|| STRNCMP(eap->cmd, "g:[", 3) == 0)
|
||||
{
|
||||
char_u *after = eap->cmd;
|
||||
|
||||
|
Reference in New Issue
Block a user