Closed tkrajacic closed 2 months ago
By default, CotEditor automatically saves (overwrites) the document while editing. You can change this behavior by toggling the "Enable Auto Save with Versions" option in the General Settings.
If you have the issue even when you disabled the Autosave feature, let me know if the phenomenon appears only after updating to CotEditor 5.0.0, or you haven't tried the previous versions.
You are of course 100% correct, and that was the issue. Turning off auto-save restored correct behavior.
I suppose you can close this issue as it seems to be working as intended, even though I would have expected different behavior. Thank you for looking into this.
Thank you for the reply. I'm glad you were able to resolve this issue.
CotEditor enables Autosave as default since Apple advocates that modern apps should be. I understand the need not to use Autosave, though, so CotEditor provides the option to disable it.
I wonder if it would be possible though to make sure that once a document duplicated with "Save As…", that the previous document is reset to its last user-saved state. This would be the expected behavior imho.
It depends on the use case, I suppose. In addition, since the current behavior is provided by the standard framework by Apple, I believe this is the standard behavior and should not be changed. A lot of other native macOS apps work already in the same manner.
Description
When editing a file on macOS, there is the option of saving yet unsaved work (keeping the saved file in the previous state) into a new file by using "Save As…" (holding "Option" when opening the "File" menu)
CotEditor erroneously save the changes to the new AND old file, thereby deleting your old content in the original file. This is a serious bug which results in data loss.
To Reproduce
Expected behavior
file1.txt contains "1,2" file2.txt contains "1"
CotEditor version
5.0.0 (674)
macOS version
15.0
Additional context
No response