forked from aniani/vim
patch 7.4.1113
Problem: Using {ns} in variable name does not work. (lilydjwg) Solution: Fix recognizing colon. Add a test.
This commit is contained in:
@@ -20844,10 +20844,10 @@ find_name_end(arg, expr_start, expr_end, flags)
|
||||
else if (br_nest == 0 && mb_nest == 0 && *p == ':')
|
||||
{
|
||||
/* "s:" is start of "s:var", but "n:" is not and can be used in
|
||||
* slice "[n:]". Also "xx:" is not a namespace. */
|
||||
* slice "[n:]". Also "xx:" is not a namespace. But {ns}: is. */
|
||||
len = (int)(p - arg);
|
||||
if ((len == 1 && vim_strchr(NAMESPACE_CHAR, *arg) == NULL)
|
||||
|| len > 1)
|
||||
|| (len > 1 && p[-1] != '}'))
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user