From 11b06ce10256daad65a4dae95657710dc1902218 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 14 Feb 2009 12:28:38 -0500 Subject: Be consistant in hacking around GTK-OSX's handling of 'Alt'; core/ext/keys.lua --- core/ext/keys.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'core') 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 -- cgit v1.2.3