aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+orbitalquark@users.noreply.github.com>2021-04-14 22:46:20 -0400
committermitchell <70453897+orbitalquark@users.noreply.github.com>2021-04-14 22:46:20 -0400
commita1843428319d1f96acaaf42e81e701de9988d06f (patch)
tree220e91d1110f1856523c50df6c7e4752312a0d54 /modules/textadept/find.lua
parent07f1785afd1afc28d18a49999ea6f3b3dc836926 (diff)
downloadtextadept-a1843428319d1f96acaaf42e81e701de9988d06f.tar.gz
textadept-a1843428319d1f96acaaf42e81e701de9988d06f.zip
Attempt to restore view scroll state after `textadept.editing.filter_through()`.
Also prefer `view.first_visible_line =` rather than `view:scroll_lines()` since the latter is only needed when display lines are involved.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r--modules/textadept/find.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 0d90885f..df51048b 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -223,7 +223,7 @@ local function find(text, next, flags, no_wrap, wrapped)
pos = find(text, next, flags, true, true)
if pos == -1 then
ui.statusbar_text = _L['No results found']
- view:line_scroll(0, first_visible_line - view.first_visible_line)
+ view.first_visible_line = first_visible_line
buffer:goto_pos(incremental_orig_pos or anchor)
end
end