Repository navigation
fix(syntax): restart long passes when a grammar arrives mid-pass - #73
Merged
Merged
Conversation
A grammar arriving reran only the parked jobs. A long highlight that had yielded waited in the queue instead, so the retry missed it: its later windows used the new grammar, but the windows colored before it arrived kept the host's colors for good, while the side reported it was done. On a retry, a yielded pass that was missing grammars now starts over from the first window. A pass from the start also stops inheriting the missing languages of the pass before it, which made a recolored file park again and redo every window on each later grammar arrival.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In a long file still streaming its highlight, the windows colored before an embedded grammar (such as HTML in a template) finished downloading kept the host language's colors for good, while the file reported it was done: the worker's retry only reran parked jobs and missed a pass waiting for its next turn. A retry now restarts such a pass from the first window, and a pass that starts over no longer inherits the previous pass's missing languages, which had made a recolored file park again and re-highlight every window on each later grammar arrival.