Fix the DECTCEM reset position in the conpty stream#17148
Merged
zadjii-msft merged 1 commit intomicrosoft:mainfrom Apr 29, 2024
Merged
Fix the DECTCEM reset position in the conpty stream#17148zadjii-msft merged 1 commit intomicrosoft:mainfrom
zadjii-msft merged 1 commit intomicrosoft:mainfrom
Conversation
lhecker
approved these changes
Apr 28, 2024
zadjii-msft
approved these changes
Apr 29, 2024
Member
zadjii-msft
left a comment
There was a problem hiding this comment.
oh yea that's an obvious bug for sure
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 29, 2024
## Summary of the Pull Request When the conpty renderer determines that it needs to hide the cursor, it does so by inserting a `DECTCEM` reset sequence at the start of the output buffer, assuming that is the start of the frame. But when the `_noFlushOnEnd` flag is set, you can have multiple frames pending in the buffer, and the `DECTCEM` sequence will then end up in the wrong place. This PR fixes the issue by saving the buffer size at the start of the frame, and using that saved offset as the insert position for the `DECTCEM` sequence. ## Validation Steps Performed I have a game that was frequently affected by this issue (the cursor would be visible when it was meant to be hidden). With this PR applied, it now works perfectly. ## PR Checklist - [x] Closes #15449
DHowett
pushed a commit
that referenced
this pull request
Apr 30, 2024
## Summary of the Pull Request When the conpty renderer determines that it needs to hide the cursor, it does so by inserting a `DECTCEM` reset sequence at the start of the output buffer, assuming that is the start of the frame. But when the `_noFlushOnEnd` flag is set, you can have multiple frames pending in the buffer, and the `DECTCEM` sequence will then end up in the wrong place. This PR fixes the issue by saving the buffer size at the start of the frame, and using that saved offset as the insert position for the `DECTCEM` sequence. ## Validation Steps Performed I have a game that was frequently affected by this issue (the cursor would be visible when it was meant to be hidden). With this PR applied, it now works perfectly. ## PR Checklist - [x] Closes #15449 (cherry picked from commit ef318a1) Service-Card-Id: 92457089 Service-Version: 1.19
DHowett
pushed a commit
that referenced
this pull request
Apr 30, 2024
## Summary of the Pull Request When the conpty renderer determines that it needs to hide the cursor, it does so by inserting a `DECTCEM` reset sequence at the start of the output buffer, assuming that is the start of the frame. But when the `_noFlushOnEnd` flag is set, you can have multiple frames pending in the buffer, and the `DECTCEM` sequence will then end up in the wrong place. This PR fixes the issue by saving the buffer size at the start of the frame, and using that saved offset as the insert position for the `DECTCEM` sequence. ## Validation Steps Performed I have a game that was frequently affected by this issue (the cursor would be visible when it was meant to be hidden). With this PR applied, it now works perfectly. ## PR Checklist - [x] Closes #15449 (cherry picked from commit ef318a1) Service-Card-Id: 92457090 Service-Version: 1.20
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
When the conpty renderer determines that it needs to hide the cursor,
it does so by inserting a
DECTCEMreset sequence at the start of theoutput buffer, assuming that is the start of the frame. But when the
_noFlushOnEndflag is set, you can have multiple frames pending in thebuffer, and the
DECTCEMsequence will then end up in the wrong place.This PR fixes the issue by saving the buffer size at the start of the
frame, and using that saved offset as the insert position for the
DECTCEMsequence.Validation Steps Performed
I have a game that was frequently affected by this issue (the cursor
would be visible when it was meant to be hidden). With this PR applied,
it now works perfectly.
PR Checklist