Skip to content

Conversation

@thecoolwinter
Copy link
Collaborator

Description

  • Modifies CodeFileView to mark the document as changed immediately when changes occur rather than debounced. This fixes a small issue where the "Edited" marker would appear after the file was saved, because the change notification was debounced.
  • Adds some error logging to CodeFileDocument.

Related Issues

  • None

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Before:

Screen.Recording.2024-08-25.at.11.13.58.PM.mov

After:

Screen.Recording.2024-08-25.at.11.10.08.PM.mov

@thecoolwinter thecoolwinter added the bug Something isn't working label Aug 26, 2024
Copy link
Member

@tom-ludwig tom-ludwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, but isn’t the ‘Edited’ indicator still lagging?

@thecoolwinter
Copy link
Collaborator Author

The code looks good, but isn’t the ‘Edited’ indicator still lagging?

I think you're seeing that autosave is debounced by a second to avoid trying to save the file every keystroke. So the bit of time after editing before it disappears is the wait until that happens.

@thecoolwinter thecoolwinter merged commit 02b6919 into CodeEditApp:main Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants