0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1012: Vim9: cannot declare single character script variables

Problem:    Vim9: cannot declare single character script variables.
Solution:   Don't see "b:", "s:", etc. as namespace.  Fix item size of
            sn_var_vals.
This commit is contained in:
Bram Moolenaar
2020-06-19 19:01:43 +02:00
parent c785b9a7f4
commit 3b74b6b4bb
4 changed files with 39 additions and 2 deletions

View File

@@ -471,7 +471,7 @@ vim9_declare_scriptvar(exarg_T *eap, char_u *arg)
}
for (p = arg + 1; *p != NUL && eval_isnamec(*p); MB_PTR_ADV(p))
if (*p == ':' && p != arg + 1)
if (*p == ':' && (VIM_ISWHITE(p[1]) || p != arg + 1))
break;
if (*p != ':')