diff options
author | 2009-01-25 11:15:45 -0500 | |
---|---|---|
committer | 2009-01-25 11:15:45 -0500 | |
commit | dd69c77712c089902194f2a2d74b6ffdfff6c78d (patch) | |
tree | b11916c36ad396bb1e2d8a4396fca3e1f1ddbd13 /core/ext | |
parent | db102bc9448f0606fd3750c8961863af9483ebfc (diff) | |
download | textadept-dd69c77712c089902194f2a2d74b6ffdfff6c78d.tar.gz textadept-dd69c77712c089902194f2a2d74b6ffdfff6c78d.zip |
Scroll the view back to how it was for 'no results found'; core/ext/find.lua
Diffstat (limited to 'core/ext')
-rw-r--r-- | core/ext/find.lua | 2 |
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 |