Skip to content

Commit

Permalink
fix: never hook j and k in INSERT mode automatcally to prevent jk kj …
Browse files Browse the repository at this point in the history
…<ESC> mappings to work as intended
  • Loading branch information
folke committed May 1, 2021
1 parent 9040b9e commit 9a2faed
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 @@ -257,6 +257,7 @@ function M.hook_del(prefix, mode, buf)
end

function M.hook_add(prefix, mode, buf, secret_only)
if mode == "i" and (prefix == "j" or prefix == "k") 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 9a2faed

Please sign in to comment.