Skip to content

Commit

Permalink
fix(help): get rid of any tbl_flatten or iter flatten code
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 19, 2024
1 parent 5d29ffe commit 56a34a8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lua/lazy/help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ function M.index(plugin)
return {}
end

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

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

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

0 comments on commit 56a34a8

Please sign in to comment.