fix(#1557): autosave
Description
When making changes to a file and having autosave enabled, the edits will be saved.
Related Issues
- #1557
Checklist
- [x] I read and understood the contributing guide as well as the code of conduct
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code
Screenshots
This looks great, just make sure if the user disables autosave in Settings it works as expected.
It should work as expected now.
Autosave On
https://github.com/CodeEditApp/CodeEdit/assets/40566101/f4e00829-4900-47da-9055-d5184b47c662
Autosave Off
https://github.com/CodeEditApp/CodeEdit/assets/40566101/499c397b-d813-4336-ba47-c3d1762eb703
Oh just ran into a glitch: If I edit a doc with auto-save off, then switch auto-save back on, the changed file indicator sticks around. It's not behaving as expected. @austincondiff, should I go ahead and merge this PR? It technically addresses the auto-save issue.
https://github.com/CodeEditApp/CodeEdit/assets/83090745/801ade2a-52f1-4a18-acbe-c50298523cfb
It seems that you are turning auto save on with an unsaved file open. If it has been saved and it is turned on does it work as expected?
In this case we need to merge this PR and open a subsequent issue addressing the enabling of auto save while an unsaved file is open. What is the expected behavior when this happens? Should it save all unsaved files? Should we wait to save an unsaved file after the first modification? Should we wait to save after the first manual save then auto save works normally for that file?
Yeah, saving first and turning auto-save back on works fine, so let's go ahead and merge.
Regarding the other questions, I'm currently uncertain. Let's discuss those matters in detail within the issue once it's created