diff --git a/data/plugins/workspace.lua b/data/plugins/workspace.lua index 788a753a..6426cbdb 100644 --- a/data/plugins/workspace.lua +++ b/data/plugins/workspace.lua @@ -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