Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2018 04:44:47 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329356 - head/stand/lua
Message-ID:  <201802160444.w1G4il7X031907@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Feb 16 04:44:47 2018
New Revision: 329356
URL: https://svnweb.freebsd.org/changeset/base/329356

Log:
  stand/lua: Allow menu items to not have explicit aliases
  
  This will generally be used for cases like "Back to main menu" that already
  have global aliases installed.

Modified:
  head/stand/lua/drawer.lua

Modified: head/stand/lua/drawer.lua
==============================================================================
--- head/stand/lua/drawer.lua	Fri Feb 16 04:31:09 2018	(r329355)
+++ head/stand/lua/drawer.lua	Fri Feb 16 04:44:47 2018	(r329356)
@@ -173,8 +173,10 @@ function drawer.drawmenu(m)
 
 			-- fill the alias table
 			alias_table[tostring(entry_num)] = e;
-			for n, a in ipairs(e.alias) do
-				alias_table[a] = e;
+			if (e.alias ~= nil) then
+				for n, a in ipairs(e.alias) do
+					alias_table[a] = e;
+				end
 			end
 		else
 			screen.setcursor(x, y + line_num);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802160444.w1G4il7X031907>