Lock when changing selection endpoint on wheel/auto-scroll#5551
Merged
DHowett-MSFT merged 1 commit intomasterfrom Apr 24, 2020
Merged
Lock when changing selection endpoint on wheel/auto-scroll#5551DHowett-MSFT merged 1 commit intomasterfrom
DHowett-MSFT merged 1 commit intomasterfrom
Conversation
… renderer while it's rendering a frame.
Contributor
|
Don’t auto merge because it will delete the body of the message |
DHowett-MSFT
approved these changes
Apr 24, 2020
carlos-zamora
approved these changes
Apr 24, 2020
|
🎉 Handy links: |
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.
Summary of the Pull Request
Takes the lock inside two routines in
TermControlthat were changing the selection endpoint while a rendering frame was still drawing, resulting in several variants of graphical glitches from double-struck selection boxes to duplicated line text.References
PR Checklist
Detailed Description of the Pull Request / Additional comments
The renderer base and specific renderer engine do a lot of work to remember the previous selection and compensate for scrolling regions and deltas between frames. However, all that work doesn't quite match up when the endpoints are changed out from under it. Unfortunately,
TermControldoesn't have a robust history of locking correctly in step with the renderer nor does the renderer'sIRenderDatacurrently provide any way of 'snapping' state at the beginning of a frame so it could work without a full lock. So the solution for now is for the methods that scroll the display inTermControlto take the lock that is shared with the renderer's frame painter so they can't change out of sync.Validation Steps Performed