Skip to content

Commit

Permalink
fix(keys): never lazy-load <nop> or empty rhs keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 6, 2024
1 parent 0fc34a0 commit 3e4c795
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/lazy/core/handler/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ function M:_add(keys)

---@param buf? number
local function add(buf)
if type(keys.rhs) == "string" and (keys.rhs == "" or keys.rhs:lower() == "<nop>") then
return self:_set(keys, buf)
end

vim.keymap.set(keys.mode, lhs, function()
local plugins = self.active[keys.id]

Expand Down

0 comments on commit 3e4c795

Please sign in to comment.