Author: kevans
Date: Wed Feb 14 20:18:23 2018
New Revision: 329274
URL: https://svnweb.freebsd.org/changeset/base/329274

Log:
  stand/lua: Exit sub-menus on backspace

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua     Wed Feb 14 20:15:32 2018        (r329273)
+++ head/stand/lua/menu.lua     Wed Feb 14 20:18:23 2018        (r329274)
@@ -270,8 +270,14 @@ function menu.run(m)
 
        cont = true;
        while cont do
-               local key = string.char(io.getchar());
+               local key = io.getchar();
 
+               -- Exit on backspace
+               if (key == 127) and (m ~= menu.welcome) then
+                       break
+               end
+
+               key = string.char(key)
                -- check to see if key is an alias
                local sel_entry = nil;
                for k, v in pairs(alias_table) do
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to