aboutsummaryrefslogtreecommitdiff
path: root/core/ext
diff options
context:
space:
mode:
Diffstat (limited to 'core/ext')
-rw-r--r--core/ext/find.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/ext/find.lua b/core/ext/find.lua
index 11a6f448..90cb2176 100644
--- a/core/ext/find.lua
+++ b/core/ext/find.lua
@@ -28,6 +28,7 @@ local escapes = {
function find.find(text, next, flags, nowrap, wrapped)
local buffer = buffer
local locale = textadept.locale
+ local first_visible_line = buffer.first_visible_line -- for 'no results found'
local increment
if buffer.current_pos == buffer.anchor then
@@ -130,6 +131,7 @@ function find.find(text, next, flags, nowrap, wrapped)
result = find.find(text, next, flags, true, true)
if not result then
textadept.statusbar_text = locale.FIND_NO_RESULTS
+ buffer:line_scroll(0, first_visible_line)
buffer:goto_pos(anchor)
end
return result