mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(util): on_key compat with Neovim 0.9
This commit is contained in:
parent
3d67bda1e2
commit
effa885120
1 changed files with 2 additions and 2 deletions
|
|
@ -227,8 +227,8 @@ function M.on_key(key, cb)
|
|||
keys[code] = keys[code] or {}
|
||||
table.insert(keys[code], cb)
|
||||
on_key_ns = on_key_ns
|
||||
or vim.on_key(function(_, typed)
|
||||
for _, c in ipairs(keys[typed] or {}) do
|
||||
or vim.on_key(function(resolved, typed)
|
||||
for _, c in ipairs(keys[typed or resolved] or {}) do
|
||||
pcall(c, typed)
|
||||
end
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue