aboutsummaryrefslogtreecommitdiff
path: root/core/ext/command_entry.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-06-06 18:33:15 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-06-06 18:33:15 -0400
commit7596407f68acb8d63f91e15c591cf415351521ee (patch)
treec49e2303e2831588357ca3e349df83e5a9a1a2eb /core/ext/command_entry.lua
parent8ab67ae03b55b8718bea4bba638af2994d333c13 (diff)
downloadtextadept-7596407f68acb8d63f91e15c591cf415351521ee.tar.gz
textadept-7596407f68acb8d63f91e15c591cf415351521ee.zip
Made 'KEYSYMS' table a field of core/ext/keys.lua for access.
Diffstat (limited to 'core/ext/command_entry.lua')
-rw-r--r--core/ext/command_entry.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/ext/command_entry.lua b/core/ext/command_entry.lua
index d35a8f49..34dfbe13 100644
--- a/core/ext/command_entry.lua
+++ b/core/ext/command_entry.lua
@@ -14,10 +14,11 @@ textadept.events.add_handler('command_entry_command',
textadept.events.add_handler('command_entry_keypress',
function(code)
local ce = textadept.command_entry
- if code == 0xff1b then -- escape
+ local KEYSYMS = textadept.keys.KEYSYMS
+ if KEYSYMS[code] == 'esc' then
ce.focus() -- toggle focus to hide
return true
- elseif code == 0xff09 then -- tab
+ elseif KEYSYMS[code] == '\t' then
local substring = ce.entry_text:match('[%w_.:]+$') or ''
local path, o, prefix = substring:match('^([%w_.:]-)([.:]?)([%w_]*)$')
local ret, tbl = pcall(loadstring('return ('..path..')'))