From 81017b99e799d08ea5297b0f620e4404ef41e51f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Jan 2023 08:58:18 +0100 Subject: [PATCH] fix(cache): de-duplicate topmods. Fixes #349 --- lua/lazy/core/cache.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index 4cf01b5..3f30ff2 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -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