commit | cc673e746ab98566556ff964d7a76f2fb46d7f84 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Aug 16 17:33:35 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Aug 16 17:33:35 2020 +0200 |
tree | 52b14d7898a3208e8f2d8344cc8a36e4d2b8605e | |
parent | 56acb0943ede35cd9d2f6667cde2442819ccbf59 [diff] [blame] |
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any" Problem: Vim9: cannot index or slice a variable with type "any". Solution: Add runtime index and slice.
diff --git a/src/list.c b/src/list.c index b09e87f..c730b1a 100644 --- a/src/list.c +++ b/src/list.c
@@ -914,7 +914,7 @@ semsg(_(e_listidx), n1); return FAIL; } - n1 = len; + n1 = n1 < 0 ? 0 : len; } if (range) {