Skip to content

Commit

Permalink
fix: never hook on <esc>
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 8, 2021
1 parent 8186d5a commit fd08322
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ end
function M.hook_add(prefix, mode, buf, secret_only)
if mode == "i" and (prefix == "j" or prefix == "k") then return end
if mode == "s" then return end
if prefix == Util.t("<esc>") then return end
-- Check if we need to create the hook
if type(Config.options.triggers) == "string" and Config.options.triggers ~= "auto" then
if Util.t(prefix) ~= Util.t(Config.options.triggers) then return end
Expand Down

0 comments on commit fd08322

Please sign in to comment.