]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lualoader: Invalidate the screen from menu perspective upon mnu exit
authorKyle Evans <kevans@FreeBSD.org>
Sun, 25 Feb 2018 16:29:02 +0000 (16:29 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 25 Feb 2018 16:29:02 +0000 (16:29 +0000)
commitfe226a72cb1e536427f24063b43df278fa2d0b28
tree41983d1f71a73a5ac71401c8ab36887553e7f7bf
parent9d4e369ae87de936b1c22dad2a5cff04d50e0f64
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.
stand/lua/menu.lua