mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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:
@@ -929,7 +929,8 @@ get_lval(
|
||||
if (vim9script)
|
||||
{
|
||||
// "a: type" is declaring variable "a" with a type, not "a:".
|
||||
if (p == name + 2 && p[-1] == ':')
|
||||
// However, "g:[key]" is indexing a dictionary.
|
||||
if (p == name + 2 && p[-1] == ':' && *p != '[')
|
||||
{
|
||||
--p;
|
||||
lp->ll_name_end = p;
|
||||
|
Reference in New Issue
Block a user