mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
9912a4c81b
Problem: Besides being redundant with vim.iter():flatten(), `tbl_flatten` has these problems: - Has `tbl_` prefix but only accepts lists. - Discards some results! Compare the following: - iter.flatten(): ``` vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable() ``` - tbl_flatten: ``` vim.tbl_flatten({1, { { a = 2 } }, { 3 } }) ``` Solution: Deprecate tbl_flatten. Note: iter:flatten() currently fails ("flatten() requires a list-like table") on this code from gen_lsp.lua: local anonym = vim.iter({ -- remove nil anonymous_num > 1 and '' or nil, '---@class ' .. anonymous_classname, }):flatten():totable() Should we enhance :flatten() to work for arrays? |
||
---|---|---|
.. | ||
bump_deps.lua | ||
cdoc_grammar.lua | ||
cdoc_parser.lua | ||
check_urls.vim | ||
cliff.toml | ||
download-unicode-files.sh | ||
gen_eval_files.lua | ||
gen_filetype.lua | ||
gen_help_html.lua | ||
gen_lsp.lua | ||
gen_vimdoc.lua | ||
genappimage.sh | ||
git-log-pretty-since.sh | ||
legacy2luatest.pl | ||
lintcommit.lua | ||
lintdoc.lua | ||
luacats_grammar.lua | ||
luacats_parser.lua | ||
movedocs.pl | ||
release.sh | ||
shadacat.py | ||
text_utils.lua | ||
update_terminfo.sh | ||
vim-patch.sh | ||
vimpatch.lua | ||
windows.ti |