diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-16 17:33:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-16 17:33:35 +0200 |
commit | cc673e746ab98566556ff964d7a76f2fb46d7f84 (patch) | |
tree | 52b14d7898a3208e8f2d8344cc8a36e4d2b8605e /src/list.c | |
parent | 56acb0943ede35cd9d2f6667cde2442819ccbf59 (diff) |
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"v8.2.1466
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c index b09e87f5fd..c730b1a80d 100644 --- a/src/list.c +++ b/src/list.c @@ -914,7 +914,7 @@ list_slice_or_index( semsg(_(e_listidx), n1); return FAIL; } - n1 = len; + n1 = n1 < 0 ? 0 : len; } if (range) { |