From 02fa6b18d6da55f0738d1cd97d462032c9135cd6 Mon Sep 17 00:00:00 2001 From: Grzegorz Milka Date: Sun, 17 Apr 2016 12:32:23 +0200 Subject: vim-patch:7.4.1113 Problem: Using {ns} in variable name does not work. (lilydjwg) Solution: Fix recognizing colon. Add a test. --- src/nvim/eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 9d370632a1..d3145bb45a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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; } -- cgit