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

Make sure DCS strings are flushed to conpty without delay #17195

Merged
merged 1 commit into from
May 6, 2024

Conversation

j4james
Copy link
Collaborator

@j4james j4james commented May 5, 2024

When the DCS passthrough code was first implemented, it relied on the
ActionPassThroughString method flushing the given string immediately.
However, that has since stopped being the case, so DCS operations end
up being delayed until the entire sequence has been parsed.

This PR fixes the issue by introducing a flush parameter to force an
immediate flush on the ActionPassThroughString method, as well as the
XtermEngine::WriteTerminalW method that it calls.

Validation Steps Performed

I've confirmed that the test case in issue #17111 now updates the color
table as soon as each color entry is parsed, instead of delaying the
updates until the end of the sequence.

Closes #17111

@j4james
Copy link
Collaborator Author

j4james commented May 5, 2024

If you have a better plan for fixing this, feel free to reject this PR. I just wanted to offer this as a potential solution in case nobody else gets around to looking at it in the short term.

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm alright with this solution! Thanks!

@DHowett DHowett enabled auto-merge May 6, 2024 18:57
@DHowett DHowett added this pull request to the merge queue May 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2024
@DHowett DHowett added this pull request to the merge queue May 6, 2024
Merged via the queue into microsoft:main with commit 9c16c5c May 6, 2024
15 checks passed
DHowett pushed a commit that referenced this pull request May 6, 2024
When the `DCS` passthrough code was first implemented, it relied on the
`ActionPassThroughString` method flushing the given string immediately.
However, that has since stopped being the case, so `DCS` operations end
up being delayed until the entire sequence has been parsed.

This PR fixes the issue by introducing a `flush` parameter to force an
immediate flush on the `ActionPassThroughString` method, as well as the
`XtermEngine::WriteTerminalW` method that it calls.

## Validation Steps Performed

I've confirmed that the test case in issue #17111 now updates the color
table as soon as each color entry is parsed, instead of delaying the
updates until the end of the sequence.

Closes #17111

(cherry picked from commit 9c16c5c)
Service-Card-Id: 92501226
Service-Version: 1.21
@j4james j4james deleted the fix-dcs-passthrough branch May 20, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

DCS sequences are no longer passed through in real time
4 participants