From f5ed470de6fbb96bf6fa0a7564423cc45cdcb097 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 29 Sep 2023 10:31:24 +0200 Subject: [PATCH] fix(plugin): clear Plugin._.super when rebuilding --- lua/lazy/core/plugin.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index 76b475d..c78f327 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -179,8 +179,10 @@ function Spec:rebuild(name) local fragments = {} ---@type LazyPlugin[] repeat + local super = plugin._.super if self.fragments[plugin._.fid] then plugin._.dep = plugin._.fpid ~= nil + plugin._.super = nil if plugin._.fdeps then plugin.dependencies = {} for _, cid in ipairs(plugin._.fdeps) do @@ -192,7 +194,7 @@ function Spec:rebuild(name) setmetatable(plugin, nil) table.insert(fragments, 1, plugin) end - plugin = plugin._.super + plugin = super until not plugin if #fragments == 0 then