From owner-svn-src-head@freebsd.org Sun Feb 25 16:29:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8923BF3890F; Sun, 25 Feb 2018 16:29:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37EE985139; Sun, 25 Feb 2018 16:29:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E24A7515; Sun, 25 Feb 2018 16:29:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1PGT3Aq095393; Sun, 25 Feb 2018 16:29:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1PGT3Mx095392; Sun, 25 Feb 2018 16:29:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802251629.w1PGT3Mx095392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 25 Feb 2018 16:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329986 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 329986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 16:29:03 -0000 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()