Skip to content

Commit 56a34a8

Browse files
committed
fix(help): get rid of any tbl_flatten or iter flatten code
1 parent 5d29ffe commit 56a34a8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lua/lazy/help.lua

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ function M.index(plugin)
88
return {}
99
end
1010

11-
---@param file string
12-
local tbl = vim.tbl_map(function(file)
13-
return vim.fn.expand(plugin.dir .. "/" .. file, false, true)
14-
end, Config.options.readme.files)
11+
local files = {}
1512

16-
local files = vim.iter and vim.iter(tbl):flatten():totable() or vim.tbl_flatten(tbl)
13+
for _, file in ipairs(Config.options.readme.files) do
14+
vim.list_extend(files, vim.fn.expand(plugin.dir .. "/" .. file, false, true))
15+
end
1716

1817
---@type table<string,{file:string, tag:string, line:string}>
1918
local tags = {}

0 commit comments

Comments
 (0)