svn commit: r329356 - head/stand/lua

Kyle Evans kevans at FreeBSD.org
Fri Feb 16 04:44:48 UTC 2018


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);


More information about the svn-src-head mailing list