Skip to content

Commit

Permalink
fix(meta): when a plugin is both optional and disabled, then just del…
Browse files Browse the repository at this point in the history
…ete it from the list
  • Loading branch information
folke committed Dec 13, 2024
1 parent 7c49371 commit 805b85c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/lazy/core/meta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ function M:fix_disabled()
for _, plugin in pairs(self.plugins) do
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
changes = changes + 1
self:disable(plugin)
if plugin.optional then
self:del(plugin.name)
else
self:disable(plugin)
end
end
end
self:rebuild()
Expand Down

0 comments on commit 805b85c

Please sign in to comment.