aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2019-03-28 17:20:12 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2019-03-28 17:20:12 -0400
commit2ea8536cdfba1d4d935c9b67b2230f6457dec951 (patch)
treeb7974b2649b447629b82e039deef1f764e0d5465
parent77d567df9de65662148d503659e59c763ca1342d (diff)
Fixed scrolling found text into view on long lines.
-rw-r--r--modules/textadept/find.lua2
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.