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

Underline ANSI escape sequence does not work with space before reset sequence #6976

Closed
patriksvensson opened this issue Jul 20, 2020 · 5 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@patriksvensson
Copy link

patriksvensson commented Jul 20, 2020

I've noticed that using ANSI escape sequence ESC[4mFOO ESC[0m does not underline the text as expected.
If I remove the space before the reset code ESC[0m, it works as expected.

This works as expected in cmd.exe/powershell.exe (which I assume both uses conhost), conemu and cmder.

Environment

Windows build number: Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): 1.0.1811.0

Steps to reproduce

  1. Open PowerShell console in Windows Terminal
  2. Run Write-Host "$([char]27)[1mBold$([char]27)[0m $([char]27)[4mUnderline$([char]27)[0m Normal"
    This underlines the text "Underline" as expected.
  3. Run Write-Host "$([char]27)[1mBold $([char]27)[0m$([char]27)[4mUnderline$([char]27)[0m Normal"
    This fails with underlining the text.

They say that a picture is worth a thousand words, so here's a screenshot as well of the repro.

image

Expected behavior

In the third step in the repro, I would expect the text Underline to be underlined.

Actual behavior

The text Underline is not underlined.

@ghost ghost added 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 Jul 20, 2020
@DHowett
Copy link
Member

DHowett commented Jul 20, 2020

I believe this was fixed in #6506 (I know it says color, but it applies to all attributes.). I can't reproduce this, or a very similar vim issue (changing colors/changing rendition but not toggling underline turned underline off), after 6506 with the about-to-come-out 1.2 previe

@DHowett
Copy link
Member

DHowett commented Jul 20, 2020

If you can build from source, would you mind validating that? If not, no big deal 😄

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 20, 2020
@DHowett
Copy link
Member

DHowett commented Jul 20, 2020

(For now, /dup #3076)

@ghost
Copy link

ghost commented Jul 20, 2020

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 Jul 20, 2020
@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 Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 20, 2020
@patriksvensson
Copy link
Author

@DHowett I can reproduce #3076 (which have been fixed) so hopefully, that fix will fix my problem. I will build Windows Terminal from the source tomorrow and verify it.

image

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants