[Feature] Restore session
WatchMkr opened this issue · 2 comments
WatchMkr commented
Add a new section at the top of Settings.
App Settings
- Reopen projects and tabs on start (toggle)
XV-02 commented
As a hypothetical: if a file has been changed since the last time cosmic-edit was used, should that change the behaviour for reopening projects and tabs?
Should it flag you that "hey, these files have changed since last opened" or should it just do its things without comment?
joshuamegnauth54 commented
Is anyone working on this yet? If not, I think I can implement it. The steps should be something like:
- Derive deserialize and serialize for tabs - skipping unimportant fields
- Auto save the session (i.e. serialize the tabs) for changes such as new tabs or closed tabs. I opened a PR for auto saving files recently that can be reused for sessions.
- On Edit's start, reload the session file if it exists. Serde and RON should do most of the work here.