fix(cache): de-duplicate topmods. Fixes #349

This commit is contained in:
Folke Lemaitre 2023-01-13 08:58:18 +01:00
parent 70e5e08dc1
commit 81017b99e7
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 1 deletions

View File

@ -246,8 +246,10 @@ function M._index(path)
if not vim.tbl_contains(M.topmods[topname], path) then if not vim.tbl_contains(M.topmods[topname], path) then
table.insert(M.topmods[topname], path) table.insert(M.topmods[topname], path)
end end
if not vim.tbl_contains(M.indexed[path], topname) then
table.insert(M.indexed[path], topname) table.insert(M.indexed[path], topname)
end end
end
end) end)
return true return true
end end