Changed workspace to accommodate other views. (#1121)

* Added in the ability to pull scrolls from views, as all views have the capability of scrolling now.
This commit is contained in:
Adam 2022-10-09 22:55:07 -04:00 committed by GitHub
parent dad0f79708
commit d1c74f529a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,8 @@ local function save_view(view)
return {
type = "view",
active = (core.active_view == view),
module = name
module = name,
scroll = { x = view.scroll.to.x, y = view.scroll.to.y, to = { x = view.scroll.to.x, y = view.scroll.to.y } },
}
end
end
@ -162,6 +163,9 @@ local function load_node(node, t)
if t.active_view == i then
active_view = view
end
if not view:is(DocView) then
view.scroll = v.scroll
end
end
end
if active_view then