Andrii Chubko b11e60a3c5 Show save prompt when exiting editor if there are unsaved changes
To check if there are unsaved changes, the current text is compared to the original text.
If user uses the "Saved as" button to modify this file, the original text is updated.

When there are unsaved changes:
- If user clicks "Discard", the editor is exited without saving.
- If user clicks "Save" and successfully saves the file, the editor is automatically closed afterward.
- If user clicks "Save" but then fails to save or closes the save dialog, the editor is not closed.
2021-08-15 07:31:48 +03:00
..