diff options
author | 2010-04-05 15:32:33 -0400 | |
---|---|---|
committer | 2010-04-05 15:32:33 -0400 | |
commit | c9780bff7285d4bf756c689229add52b4701570b (patch) | |
tree | 8d491e3eb516fde0b5dac4786003016504d13404 /modules | |
parent | e20531bcb0cdd582c82a5083f917fb1b94557087 (diff) |
Code cleanup.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/editing.lua | 12 | ||||
-rw-r--r-- | modules/textadept/session.lua | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 553bc824..6803dc40 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -80,8 +80,7 @@ textadept.events.add_handler('char_added', end) textadept.events.add_handler('keypress', - function(code, shift, control, alt) - -- Backspace (from <gdk/gdkkeysyms.h>) + function(code, shift, control, alt) -- removes matched chars on backspace if AUTOPAIR and code == 0xff08 and buffer.selections == 1 then local buffer = buffer local current_pos = buffer.current_pos @@ -139,7 +138,7 @@ textadept.events.add_handler('char_added', -- local functions local insert_into_kill_ring, scroll_kill_ring -local get_preceding_number, get_sel_or_line +local get_preceding_number --- -- Goes to a matching brace position, selecting the text inside if specified. @@ -584,10 +583,3 @@ get_preceding_number = function() end return tonumber(txt) or 1, #txt end - --- Returns the current selection or the contents of the current line. -get_sel_or_line = function() - local buffer = buffer - if buffer:get_sel_text() == '' then select_line() end - return buffer:get_sel_text() -end diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index ed1cbe8e..af3d1887 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -167,4 +167,4 @@ function save(filename) end textadept.events.add_handler('quit', - function() if SAVE_ON_QUIT then save() end end, 1) + function() if SAVE_ON_QUIT then save() end end, 1) |