diff options
author | 2016-10-18 22:57:19 -0400 | |
---|---|---|
committer | 2016-10-18 22:57:19 -0400 | |
commit | ffa6e98d0f1e4bc5d44ad57ac375cd85fc0c9fdc (patch) | |
tree | af4425678c12f49032025a298b321cbd4ad31999 /modules | |
parent | 23f33c50868a3d45c09bb08f1e1e7e8dbb9653dd (diff) | |
download | textadept-ffa6e98d0f1e4bc5d44ad57ac375cd85fc0c9fdc.tar.gz textadept-ffa6e98d0f1e4bc5d44ad57ac375cd85fc0c9fdc.zip |
Fixed bug in find/replace with consecutive matches; modules/textadept/find.lua
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/find.lua | 5 |
1 files changed, 2 insertions, 3 deletions
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. |