aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/textadept/find.lua1
-rw-r--r--properties.lua2
2 files changed, 2 insertions, 1 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.
diff --git a/properties.lua b/properties.lua
index 4374162c..ad19ce8f 100644
--- a/properties.lua
+++ b/properties.lua
@@ -17,7 +17,7 @@ buffer.mouse_selection_rectangular_switch = true
buffer:set_x_caret_policy(buffer.CARET_SLOP, 20)
buffer:set_y_caret_policy(buffer.CARET_SLOP + buffer.CARET_STRICT +
buffer.CARET_EVEN, 1)
---buffer:set_visible_policy()
+buffer:set_visible_policy(buffer.VISIBLE_SLOP + buffer.VISIBLE_STRICT, 5)
--buffer.h_scroll_bar = CURSES
--buffer.v_scroll_bar = false
if CURSES and not (WIN32 or LINUX or BSD) then buffer.v_scroll_bar = false end