With Restore Session disabled Text Editor loses unsaved changes
I think this should be a high priority issue because it involves Text Editor losing user data.
- Disable the Restore Session setting
- Open a new document
- Enter some text into the new document, but don't save it
- Simulate a Text Editor or computer crash, for example:
killall gnome-text-editor
- Re-launch text editor
Expected behavior: the user should not lose any work if the app or computer crashes so Text Editor should re-open the unsaved document and show its Document Restored dialog (Unsaved document has been restored Save As...). This is what Text Editor would do if the Restore Session setting were enabled. Notes:
- I understand that with Restore Session disabled Text Editor doesn't normally re-open the documents from the previous session but a crash is a special-case: to avoid losing work Text Editor needs to recover the user's unsaved documents
- I'm not saying that Text Editor should re-open all documents from the previous session after a crash, only unsaved documents
- This applies to both new (never-saved) documents and to previously-saved documents that had unsaved changes when the crash occurred. Both of these types of document should be recovered when re-launching Text Editor after a crash
Actual behavior: when you re-open Text Editor in step 5 it just opens a new document, the user's unsaved work has been lost.
Screencast_from_17-06-22_12_55_00
Notes:
- The document has actually been saved in
$HOME/.local/share/org.gnome.TextEditor/drafts/
but there's no way for the user to know this because Text Editor doesn't recover the unsaved work for the user. As far as the user is concerned their work is lost.