Skip to content

Commit

Permalink
fix: correctly unhook buffer local mappings before executing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 29, 2021
1 parent 8500ebf commit 4f98b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function M.execute(prefix, mode, buf)
-- make sure we remove all WK hooks before executing the sequence
-- this is to make existing keybindongs work and prevent recursion
unhook(Keys.get_tree(mode).tree:path(prefix))
unhook(buf and Keys.get_tree(mode, buf).tree:path(prefix) or {})
unhook(buf and Keys.get_tree(mode, buf).tree:path(prefix) or {}, buf)

-- fix <lt>
prefix = prefix:gsub("<lt>", "<")
Expand Down

0 comments on commit 4f98b47

Please sign in to comment.