From e22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 23 Jun 2011 22:35:20 -0400 Subject: Use string constants for event names. --- modules/textadept/filter_through.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/textadept/filter_through.lua') 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 mitchellcaladbolg.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 -- cgit v1.2.3