mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-03 18:28:38 +00:00
fix(scratch): sort keys. Fixes #193
This commit is contained in:
parent
f955f082e0
commit
0df7a08b01
1 changed files with 3 additions and 0 deletions
|
@ -242,6 +242,9 @@ function M.open(opts)
|
|||
opts.win.buf = buf
|
||||
local ret = Snacks.win(opts.win)
|
||||
ret.opts.footer = {}
|
||||
table.sort(ret.keys, function(a, b)
|
||||
return a[1] < b[1]
|
||||
end)
|
||||
for _, key in ipairs(ret.keys) do
|
||||
local keymap = vim.fn.keytrans(vim.keycode(key[1]))
|
||||
table.insert(ret.opts.footer, { " " })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue