Save drafts of all edited work
This is a reboot of an issue originally filed back in 2012. In my opinion it is one of the main issues with gedit today, and I know I'm not alone.
To summarise: there are all kinds of situations in which unsaved work can be lost in gedit, wasting people's time and energy. The proposal for how to fix this goes like this (slightly amended from the original proposal):
- All unsaved edits should be automatically saved to a cache (possibly somewhere like ~/.config/gedit/drafts).
- When the changes are saved to a file by the user, the cached edits are moved there. The cache is then empty.
- If gedit starts and there is content in the drafts folder, it should be opened along with a infobar that states that this is unsaved work that has been restored. The infobar can include a button to save. If there's existing work that has been saved, it can also include the option to discard the draft.
- gedit should no longer block logout or shutdown when there is unsaved work.
- If a document with unsaved changes is explicitly closed by the user, gedit should ask the user whether it should discard the draft or save it.