Skip to content

Commit 9d92e65

Browse files
committed
fix(keys): fixed adding managed keys
1 parent 9102d05 commit 9d92e65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/lazy/core/handler/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ function M:add(plugin)
9595
if not self.active[key] then
9696
self.active[key] = {}
9797
self:_add(value)
98+
self.managed[key] = key
9899
end
99-
self.managed[key] = self.managed[key]
100100
self.active[key][plugin.name] = plugin.name
101101
end
102102
end

lua/lazy/core/handler/keys.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ end
4747
---@param mode? string
4848
function M:have(lhs, mode)
4949
local keys = M.parse(lhs, mode)
50-
return self.managed[keys.id]
50+
return self.managed[keys.id] ~= nil
5151
end
5252

5353
---@param plugin LazyPlugin

0 commit comments

Comments
 (0)