From 9d92e65fd17d35f97bed43dc92810576a57376fc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 8 Oct 2023 19:14:33 +0200 Subject: [PATCH] fix(keys): fixed adding managed keys --- lua/lazy/core/handler/init.lua | 2 +- lua/lazy/core/handler/keys.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/handler/init.lua b/lua/lazy/core/handler/init.lua index 9a3fd5a..dce3415 100644 --- a/lua/lazy/core/handler/init.lua +++ b/lua/lazy/core/handler/init.lua @@ -95,8 +95,8 @@ function M:add(plugin) if not self.active[key] then self.active[key] = {} self:_add(value) + self.managed[key] = key end - self.managed[key] = self.managed[key] self.active[key][plugin.name] = plugin.name end end diff --git a/lua/lazy/core/handler/keys.lua b/lua/lazy/core/handler/keys.lua index 9253102..30a4b4f 100644 --- a/lua/lazy/core/handler/keys.lua +++ b/lua/lazy/core/handler/keys.lua @@ -47,7 +47,7 @@ end ---@param mode? string function M:have(lhs, mode) local keys = M.parse(lhs, mode) - return self.managed[keys.id] + return self.managed[keys.id] ~= nil end ---@param plugin LazyPlugin