aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-02-14 12:28:38 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-02-14 12:28:38 -0500
commit11b06ce10256daad65a4dae95657710dc1902218 (patch)
tree21b999c407237c7422b63865f7eab951dcd5b7b7
parent9b959a396364669bf9761818cd36fe27af640239 (diff)
downloadtextadept-11b06ce10256daad65a4dae95657710dc1902218.tar.gz
textadept-11b06ce10256daad65a4dae95657710dc1902218.zip
Be consistant in hacking around GTK-OSX's handling of 'Alt'; core/ext/keys.lua
-rw-r--r--core/ext/keys.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/ext/keys.lua b/core/ext/keys.lua
index cf6cd934..ac600507 100644
--- a/core/ext/keys.lua
+++ b/core/ext/keys.lua
@@ -154,6 +154,7 @@ local function keypress(code, shift, control, alt)
local ch = string_char(code)
-- work around native GTK-OSX's handling of Alt key
if ch:find('[^A-Za-z ]') and #keychain == 0 then
+ if buffer.anchor ~= buffer.current_pos then buffer:delete_back() end
buffer:add_text(ch)
textadept.events.handle('char_added', ch)
return true