summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-16 16:49:28 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-16 16:49:28 +0100
commit9bbf63dbf8286fadc0cd6b3428010abb67b1b64d (patch)
tree7506f4e638db6940cbdbe4588369bf26e63263fc /src/testdir
parent4e640bd930d133889dbc9f9a77e29bab902e3b7d (diff)
downloadvim-9bbf63dbf8286fadc0cd6b3428010abb67b1b64d.zip
patch 7.4.1105
Problem: When using slices there is a mixup of variable name and namespace. Solution: Recognize variables that can't be a namespace. (Hirohito Higashi)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_eval.in18
-rw-r--r--src/testdir/test_eval.okbin11246 -> 11279 bytes
2 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index 087e6099a..84f26bafc 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -218,6 +218,24 @@ endfun
0:call setpos('.', sp)
jyl:$put
:"
+:" substring and variable name
+:let str = 'abcdef'
+:let n = 3
+:$put =str[n:]
+:$put =str[:n]
+:$put =str[n:n]
+:unlet n
+:let nn = 3
+:$put =str[nn:]
+:$put =str[:nn]
+:$put =str[nn:nn]
+:unlet nn
+:let b:nn = 4
+:$put =str[b:nn:]
+:$put =str[:b:nn]
+:$put =str[b:nn:b:nn]
+:unlet b:nn
+:"
:/^start:/+1,$wq! test.out
:" vim: et ts=4 isk-=\: fmr=???,???
:call getchar()
diff --git a/src/testdir/test_eval.ok b/src/testdir/test_eval.ok
index cda425c92..9ffa54157 100644
--- a/src/testdir/test_eval.ok
+++ b/src/testdir/test_eval.ok
Binary files differ