diff options
author | 2021-04-14 22:46:20 -0400 | |
---|---|---|
committer | 2021-04-14 22:46:20 -0400 | |
commit | a1843428319d1f96acaaf42e81e701de9988d06f (patch) | |
tree | 220e91d1110f1856523c50df6c7e4752312a0d54 /modules/textadept/session.lua | |
parent | 07f1785afd1afc28d18a49999ea6f3b3dc836926 (diff) | |
download | textadept-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/session.lua')
-rw-r--r-- | modules/textadept/session.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index bf19e78e..b36b158e 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -63,7 +63,7 @@ function M.load(filename) if lfs.attributes(buf.filename) then io.open_file(buf.filename) buffer:set_sel(buf.anchor, buf.current_pos) - view:line_scroll(0, buf.top_line - view.first_visible_line) + view.first_visible_line = buf.top_line for _, line in ipairs(buf.bookmarks) do buffer:marker_add(line, textadept.bookmarks.MARK_BOOKMARK) end |