Skip to content

Commit

Permalink
fix: only show message about existing <leader> mapping in NORMAL mode #…
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 17, 2021
1 parent d85ce36 commit bcc8297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ function M.update_keymaps(mode, buf)
end

-- check if <leader> was remapped
if not skip and Util.t(keymap.lhs) == Util.t("<leader>") then
if not skip and Util.t(keymap.lhs) == Util.t("<leader>") and mode == "n" then
if Util.t(keymap.rhs) == "" then
skip = true
else
Expand Down

0 comments on commit bcc8297

Please sign in to comment.