Fix issue with incorrect colorization immediately after saving a new file#4153
Merged
Colengms merged 2 commits intoAug 28, 2019
mastermicrosoft/vscode-cpptools:masterfrom
coleng/colorization_fixmicrosoft/vscode-cpptools:coleng/colorization_fixCopy head branch name to clipboard
Merged
Fix issue with incorrect colorization immediately after saving a new file#4153Colengms merged 2 commits intomastermicrosoft/vscode-cpptools:masterfrom coleng/colorization_fixmicrosoft/vscode-cpptools:coleng/colorization_fixCopy head branch name to clipboard
Colengms merged 2 commits into
mastermicrosoft/vscode-cpptools:masterfrom
coleng/colorization_fixmicrosoft/vscode-cpptools:coleng/colorization_fixCopy head branch name to clipboard
Conversation
sean-mcmanus
approved these changes
Aug 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses one of the issues mentioned in #4109 , where a newly created then saved file gets no or incorrect colorization. The cause is similar to other fixed issues involving didOpen delivering an updated document due to use of async code. Colorization code on the TS side needs similar handling, to keep track of changed document ranges, as it needs to fix up colorized ranges if the document is changed between colorization passes.
Defers TS handling of DidOpen until immediately before forwarded to native side.
Added cleanup of colorizationState on didClose, and initialization of colorizationState on didOpen instead of lazily.
Prevented reporting of changes to visible ranges of unsaved new file.