aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-11-01 17:44:57 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-11-01 17:44:57 -0400
commitfcf078c25d81ca2a9b75f6baec18ce7eb477a8f3 (patch)
treeaff95f8a75924cb6433d60aec4c93c6536e82421 /core
parentb7b4c83d44aa6e5af69ca0a33be71ac07dfa8966 (diff)
downloadtextadept-fcf078c25d81ca2a9b75f6baec18ce7eb477a8f3.tar.gz
textadept-fcf078c25d81ca2a9b75f6baec18ce7eb477a8f3.zip
Added support for some AppleEvents, use Scintilla namespace on OSX.
Diffstat (limited to 'core')
-rw-r--r--core/events.lua5
-rw-r--r--core/ext/keys.lua2
2 files changed, 6 insertions, 1 deletions
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