Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure updates to openFileVersion data is not delayed #12851

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

Colengms
Copy link
Collaborator

@Colengms Colengms commented Oct 18, 2024

I have been occasionally seeing stale colorization get applied, immediately after making an edit. I've repro'ed it with a complex TU, which takes some time to update, and noticed that it occurs quickly, as if stale results are being applied after an edit. I haven't been able to find any issues with document version tracking in the native code. I thought perhaps I could be seeing the result of: microsoft/vscode#74094

What I think is going on here is that due to onDidChangeTextDocument being delivered from the protocolFilter, it's being delayed until any other messages in queue have been processed. Since we're considering the openFileVersion to be the authority on the 'current' state of open files, this delay seems like a bad thing.

This change moves delivery of onDidChangeTextDocument into an event handler, which should avoid the delay.

@Colengms Colengms marked this pull request as ready for review October 18, 2024 00:32
@Colengms Colengms merged commit 401f91f into main Oct 18, 2024
6 checks passed
@Colengms Colengms deleted the coleng/fix_delayed_doc_version_update branch October 18, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants