mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(util): better keymap normalization
This commit is contained in:
parent
de16b44f97
commit
e1566a483d
3 changed files with 53 additions and 7 deletions
|
@ -398,8 +398,7 @@ function M:toggle_help(opts)
|
|||
|
||||
local done = {} ---@type table<string, boolean>
|
||||
for _, keymap in ipairs(keys) do
|
||||
local key = vim.fn.keytrans(Snacks.util.keycode(keymap.lhs or ""))
|
||||
key = key == "<NL>" and "<C-J>" or key
|
||||
local key = Snacks.util.normkey(keymap.lhs or "")
|
||||
if not done[key] and not (keymap.desc and keymap.desc:find("which%-key")) then
|
||||
done[key] = true
|
||||
row = row + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue