put back unformatted hotkeys

develop
shevernitskiy 2023-09-24 13:18:58 +03:00
parent 7e4fe64605
commit 9f4f14d025
1 changed files with 81 additions and 87 deletions

@ -145,12 +145,8 @@ local function get_choices(hotkeys, bindings, is_inverted)
command_str = command:sub(1, max_command_len - 3) .. '...'
end
table.insert(tokens, 1, {text=command_str})
local choice = {
icon = ARROW,
command = command,
text = tokens,
hk_width = hk_width
}
local choice = {icon=ARROW, command=command, text=tokens,
hk_width=hk_width}
max_width = math.max(max_width, hk_width + #command_str + LIST_BUFFER)
table.insert(choices, is_inverted and 1 or #choices + 1, choice)
::continue::
@ -177,8 +173,6 @@ function Menu:init()
list_width = math.max(35, list_width)
list_width = math.max(35, list_width)
local list_frame = copyall(self.hotspot.frame)
local list_widget_frame = {h=math.min(#choices, MAX_LIST_HEIGHT)}
local quickstart_frame = {}