diff options
author | NAKAI Tsuyoshi <82267684+uga-rosa@users.noreply.github.com> | 2023-04-14 19:01:08 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 12:01:08 +0200 |
commit | 7caf0eafd83b5a92f2ff219b3a64ffae4174b9af (patch) | |
tree | 5ef258ecfc37e9df9dc5951a2cccc4d30a8dc573 /runtime/doc/news.txt | |
parent | 33e90f513851c91325a016a1303c004a1388a170 (diff) | |
download | rneovim-7caf0eafd83b5a92f2ff219b3a64ffae4174b9af.tar.gz rneovim-7caf0eafd83b5a92f2ff219b3a64ffae4174b9af.tar.bz2 rneovim-7caf0eafd83b5a92f2ff219b3a64ffae4174b9af.zip |
feat(lua)!: add stricter vim.tbl_islist() and rename old one to vim.tbl_isarray() (#16440)
feat(lua)!: add stricter vim.tbl_islist(), rename vim.tbl_isarray()
Problem: `vim.tbl_islist` allows gaps in tables with integer keys
("arrays").
Solution: Rename `vim.tbl_islist` to `vim.tbl_isarray`, add new
`vim.tbl.islist` that checks for consecutive integer keys that start
from 1.
Diffstat (limited to 'runtime/doc/news.txt')
-rw-r--r-- | runtime/doc/news.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index aff1a4a24e..6697b3018a 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -15,6 +15,11 @@ BREAKING CHANGES *news-breaking* The following changes may require adaptations in user config or plugins. +• |vim.tbl_islist()| now checks whether a table is actually list-like (i.e., + has integer keys without gaps and starting from 1). For the previous + behavior (only check for integer keys, allow gaps or not starting with 1), + use |vim.tbl_isarray()|. + • "#" followed by a digit no longer stands for a function key at the start of the lhs of a mapping. |