diff options
author | 2011-06-23 22:35:20 -0400 | |
---|---|---|
committer | 2011-06-23 22:35:20 -0400 | |
commit | e22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8 (patch) | |
tree | 76df894b4f5468c3d85d990129e1e13b890e4ea9 /modules/textadept/filter_through.lua | |
parent | 79a37f07e3f57694a436db9a25e296c8d177041a (diff) | |
download | textadept-e22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8.tar.gz textadept-e22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8.zip |
Use string constants for event names.
Diffstat (limited to 'modules/textadept/filter_through.lua')
-rw-r--r-- | modules/textadept/filter_through.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/textadept/filter_through.lua b/modules/textadept/filter_through.lua index 6861166f..8f6b70db 100644 --- a/modules/textadept/filter_through.lua +++ b/modules/textadept/filter_through.lua @@ -1,6 +1,7 @@ -- Copyright 2007-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE. local L = _G.locale.localize +local events = _G.events --- -- Filter-Through for the textadept module. @@ -26,14 +27,14 @@ function filter_through() gui.command_entry.focus() end -events.connect('command_entry_keypress', function(code) +events.connect(events.COMMAND_ENTRY_KEYPRESS, function(code) if filter_through_active and code == 0xff1b then -- escape filter_through_active = false end end, 1) -- place before command_entry.lua's handler (if necessary) -- Filter through. -events.connect('command_entry_command', function(text) +events.connect(events.COMMAND_ENTRY_COMMAND, function(text) if filter_through_active then local buffer = buffer local s, e = buffer.selection_start, buffer.selection_end |