Skip to content

Commit

Permalink
fix(cache): de-duplicate topmods. Fixes #349
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 13, 2023
1 parent 70e5e08 commit 81017b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazy/core/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ function M._index(path)
if not vim.tbl_contains(M.topmods[topname], path) then
table.insert(M.topmods[topname], path)
end
table.insert(M.indexed[path], topname)
if not vim.tbl_contains(M.indexed[path], topname) then
table.insert(M.indexed[path], topname)
end
end
end)
return true
Expand Down

0 comments on commit 81017b9

Please sign in to comment.