From c9780bff7285d4bf756c689229add52b4701570b Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 5 Apr 2010 15:32:33 -0400 Subject: Code cleanup. --- modules/textadept/editing.lua | 12 ++---------- modules/textadept/session.lua | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'modules') 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 ) + 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) -- cgit v1.2.3