From 8ecc8aa21bf61063a8e2d0ef29a78d4a62616d29 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 13 Jul 2011 20:51:17 -0400 Subject: Refactored key commands and added menu accelerators. Key commands are now in keys.conf and keys.osx.conf which are loaded by the _m.textadept.menu module. --- modules/textadept/editing.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/textadept/editing.lua') diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 16ead02b..885449a4 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -87,7 +87,7 @@ events.connect(events.CHAR_ADDED, function(c) end) -- Removes matched chars on backspace. -events.connect(events.KEYPRESS, function(code, shift, control, alt) +events.connect(events.KEYPRESS, function(code) if not AUTOPAIR or K[code] ~= '\b' or buffer.selections ~= 1 then return end local buffer = buffer local pos = buffer.current_pos @@ -398,7 +398,7 @@ end --- -- Selects all text with the same style as under the caret. -function select_scope() +function select_style() local buffer = buffer local start_pos, length = buffer.current_pos, buffer.length local base_style, style_at = buffer.style_at[start_pos], buffer.style_at @@ -446,7 +446,7 @@ local function clear_highlighted_words() buffer:indicator_clear_range(0, buffer.length) end events.connect(events.KEYPRESS, - function(c) if K[c] == 'esc' then clear_highlighted_words() end end) + function(code) if K[code] == 'esc' then clear_highlighted_words() end end) --- -- Highlights all occurances of the word under the caret and adds markers to the -- cgit v1.2.3