From 8bcdb16e18641e1cea08ebb614d70d98a3c27426 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 26 Sep 2011 18:11:57 -0400 Subject: Lua code cleanup. --- core/keys.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'core/keys.lua') diff --git a/core/keys.lua b/core/keys.lua index 400d06dd..4d438426 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -167,8 +167,8 @@ local function run_command(command, command_type) end end end - local _, ret = xpcall(function() return f(unpack(args, 2)) end, error) - return ret + local _, result = xpcall(function() return f(unpack(args, 2)) end, error) + return result end _M.run_command = run_command -- export for menu.lua without creating LuaDoc @@ -276,10 +276,7 @@ local function get_gdk_key(key_seq) local byte = string_byte(key) if #key > 1 or byte < 32 then for i, s in pairs(KEYSYMS) do - if s == key and i ~= 0xFE20 then - byte = i - break - end + if s == key and i ~= 0xFE20 then byte = i break end end end return byte, modifiers -- cgit v1.2.3