onlook icon indicating copy to clipboard operation
onlook copied to clipboard

fix: reset isDirty state when edits revert to original

Open Nithishvb opened this issue 5 months ago • 1 comments
trafficstars

Description

Related Issues

Closes: #2183

Type of Change

  • [x] Bug fix
  • [ ] New feature
  • [ ] Documentation update
  • [ ] Release
  • [ ] Refactor
  • [ ] Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


[!IMPORTANT] Fixes isDirty state in IDEManager by using savedContent to track original file content.

  • Behavior:
    • Fixes isDirty state in IDEManager by introducing savedContent in EditorFile to track original content.
    • Updates updateFileContent() to compare content with savedContent instead of content.
    • Modifies saveActiveFile() to update savedContent after saving, ensuring isDirty is reset.
  • Data Structures:
    • Adds savedContent to EditorFile interface to store original file content.

This description was created by Ellipsis for 3120136ef4c4f37a726f545db413ffa4946f15aa. You can customize this summary. It will automatically update as commits are pushed.

Nithishvb avatar Jun 14 '25 11:06 Nithishvb