From dd69c77712c089902194f2a2d74b6ffdfff6c78d Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 25 Jan 2009 11:15:45 -0500 Subject: Scroll the view back to how it was for 'no results found'; core/ext/find.lua --- core/ext/find.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/ext/find.lua') 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 -- cgit v1.2.3