aboutsummaryrefslogtreecommitdiff
path: root/core/keys.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-09-26 18:11:57 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-09-26 18:11:57 -0400
commit8bcdb16e18641e1cea08ebb614d70d98a3c27426 (patch)
treeda922f622a6a03a875625f8905c3fbcb129e8aad /core/keys.lua
parentc2d73d4284cc5009128bc5fed68fcc5826336ea2 (diff)
downloadtextadept-8bcdb16e18641e1cea08ebb614d70d98a3c27426.tar.gz
textadept-8bcdb16e18641e1cea08ebb614d70d98a3c27426.zip
Lua code cleanup.
Diffstat (limited to 'core/keys.lua')
-rw-r--r--core/keys.lua9
1 files changed, 3 insertions, 6 deletions
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