From ffa6e98d0f1e4bc5d44ad57ac375cd85fc0c9fdc Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 18 Oct 2016 22:57:19 -0400 Subject: Fixed bug in find/replace with consecutive matches; modules/textadept/find.lua --- modules/textadept/find.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index fef3b206..949b6b07 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -145,11 +145,10 @@ local function find(text, next, flags, no_wrap, wrapped) if flags >= 0x1000000 then M.find_in_files() return end -- not performed here local first_visible_line = buffer.first_visible_line -- for 'no results found' - -- If text is selected, assume it is from the current search and increment the + -- If text is selected, assume it is from the current search and move the -- caret appropriately for the next search. if not buffer.selection_empty then - local pos = buffer[next and 'selection_end' or 'selection_start'] - buffer:goto_pos(buffer:position_relative(pos, next and 1 or -1)) + buffer:goto_pos(buffer[next and 'selection_end' or 'selection_start']) end -- Scintilla search. -- cgit v1.2.3