From fcf078c25d81ca2a9b75f6baec18ce7eb477a8f3 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 1 Nov 2008 17:44:57 -0400 Subject: Added support for some AppleEvents, use Scintilla namespace on OSX. --- core/events.lua | 5 +++++ core/ext/keys.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/events.lua b/core/events.lua index 48575b8e..451e3af1 100644 --- a/core/events.lua +++ b/core/events.lua @@ -521,6 +521,11 @@ add_handler('quit', return true end) +if MAC then + function appleevent_odoc(uri) return handle('appleevent_odoc', uri) end + add_handler('appleevent_odoc', function(uri) textadept.io.open(uri) end) +end + --- -- Default error handler. -- Opens a new buffer (if one hasn't already been opened) for printing errors. diff --git a/core/ext/keys.lua b/core/ext/keys.lua index 7b62c151..22ec2def 100644 --- a/core/ext/keys.lua +++ b/core/ext/keys.lua @@ -130,7 +130,7 @@ local function keypress(code, shift, control, alt) local key --print(code, string.char(code)) if code < 256 then - key_seq = key_seq..string.char(code):lower() + key = string.char(code):lower() if MAC and not shift and not control and not alt then local ch = string.char(code) -- work around native GTK-OSX's handling of Alt key -- cgit v1.2.3