mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.0975: Vim9: script variable does not accept optional s: prefix
Problem: Vim9: script variable does not accept optional s: prefix. Solution: Adjust the accepted syntax.
This commit is contained in:
@@ -462,15 +462,20 @@ vim9_declare_scriptvar(exarg_T *eap, char_u *arg)
|
||||
return arg + STRLEN(arg);
|
||||
}
|
||||
|
||||
for (p = arg + 1; *p != NUL && *p != ':' && eval_isnamec(*p);
|
||||
MB_PTR_ADV(p))
|
||||
;
|
||||
for (p = arg + 1; *p != NUL && eval_isnamec(*p); MB_PTR_ADV(p))
|
||||
if (*p == ':' && p != arg + 1)
|
||||
break;
|
||||
|
||||
if (*p != ':')
|
||||
{
|
||||
emsg(_(e_type_req));
|
||||
return arg + STRLEN(arg);
|
||||
}
|
||||
if (!VIM_ISWHITE(p[1]))
|
||||
{
|
||||
semsg(_(e_white_after), ":");
|
||||
return arg + STRLEN(arg);
|
||||
}
|
||||
name = vim_strnsave(arg, p - arg);
|
||||
|
||||
// parse type
|
||||
|
Reference in New Issue
Block a user