diff options
author | 2011-07-13 20:51:17 -0400 | |
---|---|---|
committer | 2011-07-13 20:51:17 -0400 | |
commit | 8ecc8aa21bf61063a8e2d0ef29a78d4a62616d29 (patch) | |
tree | ffe7a2317ddb80c558f28039a3120c8a3876afaa /modules/textadept/editing.lua | |
parent | 57101e2742f9385602c367fc054363c1e52e33a2 (diff) | |
download | textadept-8ecc8aa21bf61063a8e2d0ef29a78d4a62616d29.tar.gz textadept-8ecc8aa21bf61063a8e2d0ef29a78d4a62616d29.zip |
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.
Diffstat (limited to 'modules/textadept/editing.lua')
-rw-r--r-- | modules/textadept/editing.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 |