diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-14 20:42:25 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-14 20:42:25 +0000 |
commit | 9e54a0e753578e10910a842d631cffde32d1f133 (patch) | |
tree | 493fbfc4e3c943016355f7fd131bd6eadf02fd0a /runtime/doc/eval.txt | |
parent | 7fc904b610d5739dd7b72fb2f6b0e4b330c97179 (diff) |
updated for version 7.0d04v7.0d04
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6b8c469de7..b69fa3642d 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0d. Last change: 2006 Apr 09 +*eval.txt* For Vim version 7.0d. Last change: 2006 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -198,6 +198,11 @@ available. > :let shortlist = mylist[2:2] " List with one item: [3] :let otherlist = mylist[:] " make a copy of the List +If the second index is equal to or greater than the length of the list there +is no error and the length minus one is used: > + :let mylist = [0, 1, 2, 3] + :echo mylist[2:8] " result: [2, 3] + The second index can be just before the first index. In that case the result is an empty list. If the second index is lower, this results in an error. > :echo mylist[2:1] " result: [] |