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:
Grzegorz Milka
2016-04-17 12:32:23 +02:00
parent ba9bdb3e70
commit 02fa6b18d6
3 changed files with 20 additions and 4 deletions

View File

@@ -16986,9 +16986,9 @@ static char_u *find_name_end(char_u *arg, char_u **expr_start,
}
} 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
if ((len > 1 && p[-1] != '}')
|| (len == 1 && vim_strchr(namespace_char, *arg) == NULL)) {
break;
}