add keymap.unbind(), update contextmenu to use keymap.get_binding()

This is something probably people are looking for...
This commit is contained in:
takase1121
2021-09-08 23:11:36 +08:00
parent 51f27e47ca
commit 7e4236a82f
2 changed files with 33 additions and 8 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ function ContextMenu:register(predicate, items)
local width, height = 0, 0 --precalculate the size of context menu
for i, item in ipairs(items) do
if item ~= DIVIDER then
item.info = keymap.reverse_map[item.command]
item.info = keymap.get_binding(item.command)
end
local lw, lh = get_item_size(item)
width = math.max(width, lw)