From fdd68d51e9bcbaac89f77e235fef2f596aa35b97 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 19 Dec 2010 15:26:31 -0500 Subject: Use buffer.selection_start and buffer.selection_end. --- modules/textadept/find.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/textadept/find.lua') diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 202f7b49..3798ead9 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -256,9 +256,8 @@ local function replace_all(ftext, rtext, flags) count = count + 1 end else - local anchor, current_pos = buffer.anchor, buffer.current_pos + local anchor, current_pos = buffer.selection_start, buffer.selection_end local s, e = anchor, current_pos - if s > e then s, e = e, s end buffer:insert_text(e, '\n') local end_marker = buffer:marker_add(buffer:line_from_position(e + 1), MARK_FIND) -- cgit v1.2.3