Terminal: ANSI Underlines are rendered in the wrong color/not at all #804

Closed
opened 2026-01-30 22:04:45 +00:00 by claunia · 7 comments
Owner

Originally created by @dhrdlicka on GitHub (May 8, 2019).

Originally assigned to: @miniksa on GitHub.

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.18885.1001]

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)
    When running colortest-16 in WSL from inside Windows Terminal, underline sequences are rendered in strange colors (if they get rendered at all). Here is a comparison between the Terminal and the classic console:
    Screenshot

  • What's wrong / what should be happening instead:
    The Terminal should render ANSI underlines in the current foreground color.

Originally created by @dhrdlicka on GitHub (May 8, 2019). Originally assigned to: @miniksa on GitHub. * **Your Windows build number: (Type `ver` at a Windows Command Prompt)** `Microsoft Windows [Version 10.0.18885.1001]` * **What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)** When running `colortest-16` in WSL from inside Windows Terminal, underline sequences are rendered in strange colors (if they get rendered at all). Here is a comparison between the Terminal and the classic console: ![Screenshot](https://i.imgur.com/c4xlwHD.png) * **What's wrong / what should be happening instead:** The Terminal should render ANSI underlines in the current foreground color.
Author
Owner

@zadjii-msft commented on GitHub (May 8, 2019):

I believe @miniksa already has this one on his plate for after Build :)

@zadjii-msft commented on GitHub (May 8, 2019): I believe @miniksa already has this one on his plate for after Build :)
Author
Owner

@miniksa commented on GitHub (May 14, 2019):

Yeah I'll get to this.

@miniksa commented on GitHub (May 14, 2019): Yeah I'll get to this.
Author
Owner

@rbeesley commented on GitHub (Jun 19, 2019):

I saw this, but doing research on whether I should file a bug or not, I couldn't find anything which defined what the behavior actually should be. In some cases, the color of the underline seems to benefit the visibility. Is there a way to use escape codes to set the color of the underline?

@rbeesley commented on GitHub (Jun 19, 2019): I saw this, but doing research on whether I should file a bug or not, I couldn't find anything which defined what the behavior actually should be. In some cases, the color of the underline seems to benefit the visibility. Is there a way to use escape codes to set the color of the underline?
Author
Owner

@zadjii-msft commented on GitHub (Jul 25, 2019):

I'm 99% sure that this is in CustomTextRenderer::_FillRectangle in the DxRenderer. We think it's a BGR vs RGB problem.

@zadjii-msft commented on GitHub (Jul 25, 2019): I'm 99% sure that this is in `CustomTextRenderer::_FillRectangle` in the DxRenderer. We think it's a BGR vs RGB problem.
Author
Owner

@zadjii-msft commented on GitHub (Jul 26, 2019):

I take that back; I don't know how the DxRenderer draws underlines. They're not coming from CustomTextRenderer::DrawUnderline, that's for sure.

@zadjii-msft commented on GitHub (Jul 26, 2019): I take that back; I don't know how the DxRenderer draws underlines. They're not coming from `CustomTextRenderer::DrawUnderline`, that's for sure.
Author
Owner

@miniksa commented on GitHub (Jul 29, 2019):

It's probably in PaintBufferGridLines given that an underline has been traditionally part of the box drawing set.

bd5cae1328/src/renderer/dx/DxRenderer.cpp (L929-L1001)

@miniksa commented on GitHub (Jul 29, 2019): It's probably in `PaintBufferGridLines` given that an underline has been traditionally part of the box drawing set. https://github.com/microsoft/terminal/blob/bd5cae13281401cda50cff29b6dda29b8350cc07/src/renderer/dx/DxRenderer.cpp#L929-L1001
Author
Owner

@ghost commented on GitHub (Aug 27, 2019):

:tada:This issue was addressed in #2491, which has now been successfully released as Windows Terminal Preview v0.4.2382.0.🎉

Handy links:

@ghost commented on GitHub (Aug 27, 2019): :tada:This issue was addressed in #2491, which has now been successfully released as `Windows Terminal Preview v0.4.2382.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.4.2382.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#804