svn commit: r329986 - head/stand/lua
Kyle Evans
kevans at FreeBSD.org
Sun Feb 25 16:29:03 UTC 2018
Author: kevans
Date: Sun Feb 25 16:29:02 2018
New Revision: 329986
URL: https://svnweb.freebsd.org/changeset/base/329986
Log:
lualoader: Invalidate the screen from menu perspective upon mnu exit
In the common case, this will effectively do nothing as the menu will get
redrawn as we leave submenus regardless of whether the screen has been
marked invalid or not
However, upon escape to the loader prompt, one could do either of the
following to re-enter the menu system:
-- Method 1
require('menu').run()
-- Method 2
require('menu').process(menu.default)
With method 1, the menu will get redrawn anyways as we do this before
autoboot checking upon entry. With method 2, however, the menu will not be
redrawn without this invalidation.
Both methods are acceptable for re-entering the menu system, although the
latter method in the local module for processing new and interesting menus
is more expected.
Modified:
head/stand/lua/menu.lua
Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua Sun Feb 25 15:16:58 2018 (r329985)
+++ head/stand/lua/menu.lua Sun Feb 25 16:29:02 2018 (r329986)
@@ -407,6 +407,10 @@ function menu.process(m, keypress)
menu.redraw(m)
end
end
+ -- Invalidate the screen upon exit so that it gets redrawn upon
+ -- processing a new menu, assuming it won't be redrawn after leaving
+ -- this menu
+ screen_invalid = false
end
function menu.run()
More information about the svn-src-all
mailing list