aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/keys.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/keys.lua')
-rw-r--r--modules/textadept/keys.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 0d65f76a..f5cd0914 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -489,7 +489,6 @@ local string = _G.string
local string_char = string.char
local string_format = string.format
local pcall = _G.pcall
-local ipairs = _G.ipairs
local next = _G.next
local type = _G.type
local unpack = _G.unpack
@@ -537,7 +536,7 @@ end
-- of -1. This way, pcall will return false and -1, where the -1 can easily and
-- efficiently be checked rather than using a string error message.
local function try_get_cmd(active_table)
- for _, key_seq in ipairs(keychain) do active_table = active_table[key_seq] end
+ for i = 1, #keychain do active_table = active_table[keychain[i]] end
if #active_table == 0 and next(active_table) then
gui.statusbar_text = locale.KEYCHAIN..table.concat(keychain, ' ')
error(-1, 0)