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

Unexpected ANSI sequence behavior in cmd.exe #13231

Closed
Zeek05 opened this issue Jun 5, 2022 · 6 comments
Closed

Unexpected ANSI sequence behavior in cmd.exe #13231

Zeek05 opened this issue Jun 5, 2022 · 6 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@Zeek05
Copy link

Zeek05 commented Jun 5, 2022

Windows Terminal version

No response

Windows build number

Microsoft Windows [Version 10.0.22000.675]

Other Software

cmd.exe

Steps to reproduce

Apply any SGR sequence that affects character attributes in cmd.

Expected Behavior

IMG_9665

LEFT: You can see that the ANSI escape sequences in Windows Terminal are working as intended.

Actual Behavior

RIGHT: These changes are not propagating to CMD.exe, resizing the screen creates this bleeding effect.

This issue is related to #32

@Zeek05 Zeek05 added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jun 5, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 5, 2022
@Zeek05
Copy link
Author

Zeek05 commented Jun 5, 2022

I had contacted MS support for this issue and they redirected me to this GitHub. I am not sure how this is relevant to Terminal but, I am using cmd.exe and this place seems the most relevant.

Edit: Why is the image so compressed? 😂

@DHowett
Copy link
Member

DHowett commented Jun 6, 2022

I am not sure how this is relevant to Terminal

Good news! The code for Windows Terminal and the legacy console window are both here in this repository.

I bet you're seeing an issue we've since fixed, where attributes get extended across the screen when the window is resized. That was #32, and it applied to any text styling (color, underline, hyperlink, ...)

What is tat?

@Zeek05
Copy link
Author

Zeek05 commented Jun 6, 2022

I am not sure how this is relevant to Terminal

Good news! The code for Windows Terminal and the legacy console window are both here in this repository.

I bet you're seeing an issue we've since fixed, where attributes get extended across the screen when the window is resized. That was #32, and it applied to any text styling (color, underline, hyperlink, ...)

What is tat?

tat is an application I am developing.

Shortest explanation is, it simply sends the escape sequences to STDOUT.
So, when I do tat underline it's just emitting the underline escape sequence to stdout

I have the latest version of windows and conhost, I am not sure why the bug is persisting then? This was a screenshot yesterday..

Specifically for underlining, the program does the following:
printf("\x1b[4m");

On Windows Terminal, it works just as expected. However on conhost it is not.

@237dmitry
Copy link

Resizing terminal window works as %esc%[0m

Screenshot 2022-06-06 130742

@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Jun 6, 2022
@zadjii-msft
Copy link
Member

Yea, this looks like a combo of #32 with {that one issue where we were initializing the buffer with the current attributes, not the default ones}. I'd reckon that the conhost changes to fix #32 aren't in 10.0.22000.675, but should be available in the next major Win11 release. (I don't know what that build number will be yet).

/dup #32

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2022
@ghost
Copy link

ghost commented Jun 6, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jun 6, 2022
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 6, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants