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

Fix race condition between setDecorations and edit #172672

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pokey
Copy link
Contributor

@pokey pokey commented Jan 27, 2023

Fixes #74094

This PR is a quick sketch of an approach to solve the race condition in #74094. It borrows the version checking from applyEdit

Could alternately allow the caller (extension developer) to supply the document version number, but I think this version should solve the problem, potentially if the caller does their own additional version check against the version known to the extension host

I still need to update the interfaces and potentially add some tests, but figured I'd throw something quick together to start the conversation

@pokey
Copy link
Contributor Author

pokey commented Jul 7, 2023

Any thoughts on this one? It's been sitting open for a while and I'd love some feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextEditorDecoration applied to incorrect range if racing with user edits
2 participants