diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-17 14:59:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-17 14:59:01 +0100 |
commit | 4119cf80e1e534057680f9543e73edf7967c2440 (patch) | |
tree | c52cd076d2c07949bc5d773f88fc53c9daf056ba /src/eval.c | |
parent | 2db5c3b3ceeaded7fb5a64dc5cb22b0cb95b78a1 (diff) |
patch 7.4.1113v7.4.1113
Problem: Using {ns} in variable name does not work. (lilydjwg)
Solution: Fix recognizing colon. Add a test.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index c61b64dd60..fb2cbe79e5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; } |