Incorrectly displayed ANSI escape code ESC[40m #17940

Closed
opened 2026-01-31 05:59:08 +00:00 by claunia · 3 comments
Owner

Originally created by @ilyachalov on GitHub (Jul 15, 2022).

Windows Terminal version

1.13.11431.0

Windows build number

10.0.19043.0

Other Software

PowerShell 7.2.5

Steps to reproduce

Enter the command in 'PowerShell':

> "`e[30;40mtest`e[0m"

Expected Behavior

ANSI escape codes ESC[30m and ESC[40m is ANSI color 'Black'. It should be the same color, so there should be NO visible text in color ESC[30m on background ESC[40m.

It is said about it here:
https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters

Actual Behavior

The text of color ESC[30m is visible on background ESC[40m:

test-in-powershell-wt

In the color scheme ('Campbell Powershell'):

color-scheme-campbell-powershell

Originally created by @ilyachalov on GitHub (Jul 15, 2022). ### Windows Terminal version 1.13.11431.0 ### Windows build number 10.0.19043.0 ### Other Software PowerShell 7.2.5 ### Steps to reproduce Enter the command in 'PowerShell': ``` > "`e[30;40mtest`e[0m" ``` ### Expected Behavior ANSI escape codes ESC[30m and ESC[40m is ANSI color 'Black'. It should be the same color, so there **should be NO visible** text in color ESC[30m on background ESC[40m. It is said about it here: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters ### Actual Behavior The text of color ESC[30m is visible on background ESC[40m: ![test-in-powershell-wt](https://user-images.githubusercontent.com/48008056/179143630-7571f912-402a-4f37-aa64-36f484150c4c.png) In the color scheme ('Campbell Powershell'): ![color-scheme-campbell-powershell](https://user-images.githubusercontent.com/48008056/179144102-2c3026fa-ead1-47f4-a6c1-2d0f6e4ec394.png)
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 05:59:09 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jul 15, 2022):

I'm pretty sure you're running in to the issue described in #6810, tracked originally in #6807, and ultimately fixed by #13352 in Preview v1.15.186

@zadjii-msft commented on GitHub (Jul 15, 2022): I'm pretty sure you're running in to the issue described in #6810, tracked originally in #6807, and ultimately fixed by #13352 in [Preview v1.15.186](https://github.com/microsoft/terminal/releases/tag/v1.15.1862.0)
Author
Owner

@ilyachalov commented on GitHub (Jul 15, 2022):

@zadjii-msft You're right.

I installed 'Windows Terminal Preview', version: 1.15.1862.0. Everything looks correct there:

campbell-powershell-ok

Also everything is correct for the code ESC[37;47m.

Good job!

As I understand it, this correction will appear in the next stable version?

@ilyachalov commented on GitHub (Jul 15, 2022): @zadjii-msft You're right. I installed 'Windows Terminal Preview', version: 1.15.1862.0. Everything looks correct there: ![campbell-powershell-ok](https://user-images.githubusercontent.com/48008056/179229248-470b3de6-31b1-4cd9-b4ad-557cfdff717e.png) Also everything is correct for the code ESC[37;47m. Good job! As I understand it, this correction will appear in the next stable version?
Author
Owner

@DHowett commented on GitHub (Jul 15, 2022):

As I understand it, this correction will appear in the next stable version?

Indeed! :)

@DHowett commented on GitHub (Jul 15, 2022): > As I understand it, this correction will appear in the next stable version? Indeed! :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17940