We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7421e70 commit 9837d5bCopy full SHA for 9837d5b
lua/lazy/core/handler/keys.lua
@@ -68,9 +68,15 @@ function M:_add(value)
68
local opts = M.opts(keys)
69
opts.noremap = true
70
vim.keymap.set(keys.mode, lhs, function()
71
- pcall(vim.keymap.del, keys.mode, lhs)
+ local key = self:key(value)
72
+ local plugins = self.active[key]
73
+
74
+ -- always delete the mapping immediately to prevent recursive mappings
75
+ self:_del(value)
76
+ self.active[key] = nil
77
78
Util.track({ keys = lhs })
- Loader.load(self.active[self:key(value)], { keys = lhs })
79
+ Loader.load(plugins, { keys = lhs })
80
M.retrigger(lhs)
81
Util.track()
82
end, opts)
0 commit comments