diff options
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r-- | modules/textadept/find.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 905d1d06..a86a990c 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -133,8 +133,8 @@ local function find(text, next, flags, no_wrap, wrapped) buffer:search_anchor() local f = buffer['search_'..(next and 'next' or 'prev')] local pos = f(buffer, flags, text) - buffer:scroll_range(buffer.anchor, buffer.current_pos) buffer:ensure_visible_enforce_policy(buffer:line_from_position(pos)) + buffer:scroll_range(buffer.anchor, buffer.current_pos) find_text, found_text = text, buffer:get_sel_text() -- track for "replace all" -- If nothing was found, wrap the search. |