aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2017-07-02 16:17:45 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2017-07-02 16:17:45 -0400
commite7b1218bc916df076f848723f0bd5ba4bc68fca7 (patch)
tree22a351f626d82c8acf28a03a5996b55592c80c68 /modules/textadept/find.lua
parentb855edab2944ea821e7a50c9bd03843c74dc2820 (diff)
downloadtextadept-e7b1218bc916df076f848723f0bd5ba4bc68fca7.tar.gz
textadept-e7b1218bc916df076f848723f0bd5ba4bc68fca7.zip
When searching in files, show more lines below a match.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r--modules/textadept/find.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 3883cf8b..90bc1a82 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -161,6 +161,7 @@ local function find(text, next, flags, no_wrap, wrapped)
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))
find_text, found_text = text, buffer:get_sel_text() -- track for "replace all"
-- If nothing was found, wrap the search.