fix: submenus vertically misaligned when opened via show-submenu message

closes #459
This commit is contained in:
tomasklaen
2023-03-29 17:08:53 +02:00
parent bcb3c811ca
commit 21b37ce33b
2 changed files with 25 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ function open_command_menu(data, opts)
---@type MenuOptions
local menu_opts = {}
if opts then
menu_opts.submenu, menu_opts.mouse_nav = opts.submenu, opts.mouse_nav
menu_opts.mouse_nav = opts.mouse_nav
if opts.on_close then menu_opts.on_close = function() run_command(opts.on_close) end end
end
local menu = Menu:open(data, run_command, menu_opts)