lualoader: Directly reference submenu definition with submenu key

This commit is contained in:
Kyle Evans 2018-02-21 04:23:13 +00:00
parent dd65496a04
commit 9a28f948ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329698

View File

@ -75,7 +75,7 @@ menu.handlers = {
end,
[core.MENU_SUBMENU] = function(current_menu, entry)
-- recurse
return menu.run(entry.submenu())
return menu.run(entry.submenu)
end,
[core.MENU_RETURN] = function(current_menu, entry)
-- allow entry to have a function/side effect
@ -313,9 +313,7 @@ menu.welcome = {
return "Boot " .. color.highlight("O") ..
"ptions"
end,
submenu = function()
return menu.boot_options
end,
submenu = menu.boot_options,
alias = {"o", "O"}
},
},