CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

Fix Edited Indicator Behavior

Open Kihron opened this issue 1 year ago • 0 comments

Description

The edited indicator behavior now properly updates and aligns with Xcode's implementation.

The autosave() method provided by NSDocument automatically calls updateChangeCount accordingly. The else block in the function executed regardless of whether autosaving occurred or was enabled, triggering an unintended cleared state. As such, removing the direct call to updateChangeCount(.changeCleared) resolved the issue as the change count state is now handled properly by the autosave() method.

Related Issues

  • #1898

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

With Manual Saving

https://github.com/user-attachments/assets/35f3f435-69d7-46a8-ba00-b79269ad03a7

With Auto Save

https://github.com/user-attachments/assets/5ec5bde3-82f6-4f5c-b4d0-17439e4af85b

Kihron avatar Oct 17 '24 05:10 Kihron