VT color displayed on Windows Terminal leaks to the rest of line when resizing the terminal window #15855

Closed
opened 2026-01-31 04:50:29 +00:00 by claunia · 6 comments
Owner

Originally created by @daxian-dbw on GitHub (Nov 12, 2021).

Windows Terminal version (or Windows build number)

1.12.2931.0

Other Software

This is not related to the application that uses Windows Terminal. You can reproduce this with bash in WSL or PowerShell.

Steps to reproduce

In PowerShell, do the following:

  1. Run "`e[44;1mYEAH YEAH YEAH YEAH`e[0m"
  2. Resize the window
  3. The color gets leaked to the rest of line

Animation

Similar in bash in WSL:

Animation

Expected Behavior

Given that the string written out ends with ESC[0m to unset all attributes, the color should not leak to the rest of line when resizing window.

Actual Behavior

The color gets leaked to the rest of line when resizing happens.

Originally created by @daxian-dbw on GitHub (Nov 12, 2021). ### Windows Terminal version (or Windows build number) 1.12.2931.0 ### Other Software This is not related to the application that uses Windows Terminal. You can reproduce this with bash in WSL or PowerShell. ### Steps to reproduce In PowerShell, do the following: 1. Run ``"`e[44;1mYEAH YEAH YEAH YEAH`e[0m"`` 2. Resize the window 3. The color gets leaked to the rest of line ![Animation](https://user-images.githubusercontent.com/127450/141402255-d4f9cbb5-7e2e-4068-96da-9afccd9a15ce.gif) Similar in bash in WSL: ![Animation](https://user-images.githubusercontent.com/127450/141402405-e229d48a-275a-433b-97db-8b63e1742d70.gif) ### Expected Behavior Given that the string written out ends with ``ESC[0m`` to unset all attributes, the color should not leak to the rest of line when resizing window. ### Actual Behavior The color gets leaked to the rest of line when resizing happens.
claunia added the Resolution-Duplicate label 2026-01-31 04:50:29 +00:00
Author
Owner

@elsaco commented on GitHub (Nov 13, 2021):

@daxian-dbw alacritty does it also:

alacritty_prompt_test

@elsaco commented on GitHub (Nov 13, 2021): @daxian-dbw `alacritty` does it also: ![alacritty_prompt_test](https://user-images.githubusercontent.com/3933920/141600883-1ce71653-9c8b-4af2-a335-46319fdf691f.png)
Author
Owner

@daxian-dbw commented on GitHub (Nov 13, 2021):

The leak doesn't happen when I do the same on macOS or Ubuntu:

Animation

PowerShell adopts colors in its formatting, but when there is any resize of the window, the background color will be leaked to rest line and make it look really bad. It would be nice to fix this in Windows Terminal.

image

@daxian-dbw commented on GitHub (Nov 13, 2021): The leak doesn't happen when I do the same on macOS or Ubuntu: ![Animation](https://user-images.githubusercontent.com/127450/141601632-ee28e848-d649-425d-966f-5bfba697def3.gif) PowerShell adopts colors in its formatting, but when there is any resize of the window, the background color will be leaked to rest line and make it look really bad. It would be nice to fix this in Windows Terminal. ![image](https://user-images.githubusercontent.com/127450/141601734-eaf59dd0-dd18-4296-89f9-1a4b75ef9afa.png)
Author
Owner

@j4james commented on GitHub (Nov 13, 2021):

I'm afraid this is a known problem. Second oldest open issue in the repo actually. See #32.

Technically that's tagged as a conhost issue, but that's only because it was a couple of year before Windows Terminal was even released. I'm fairly certain the underlying cause is the same in both conhost and WT.

@j4james commented on GitHub (Nov 13, 2021): I'm afraid this is a known problem. Second oldest open issue in the repo actually. See #32. Technically that's tagged as a conhost issue, but that's only because it was a couple of year before Windows Terminal was even released. I'm fairly certain the underlying cause is the same in both conhost and WT.
Author
Owner

@daxian-dbw commented on GitHub (Nov 13, 2021):

Thanks @j4james, I didn't find that issue before opening this one. Maintainers can close this one as a duplicate.
It's a little disappointing to see #32 is marked with "Priority-3". Wish it can be addressed sooner.

@daxian-dbw commented on GitHub (Nov 13, 2021): Thanks @j4james, I didn't find that issue before opening this one. Maintainers can close this one as a duplicate. It's a little disappointing to see #32 is marked with "Priority-3". Wish it can be addressed sooner.
Author
Owner

@zadjii-msft commented on GitHub (Nov 15, 2021):

/dup #32

It's a little disappointing to see #32 is marked with "Priority-3". Wish it can be addressed sooner.

Alas, it's a combination of "It's a hard bug to fix" combined with "it's not that impactful". If anyone's got clever ideas of how to solve that, we're all ears! We suspect it'll just get better when #8000 is finished as well, though it's anyone's guess when that'll be done.

@zadjii-msft commented on GitHub (Nov 15, 2021): /dup #32 > It's a little disappointing to see #32 is marked with "Priority-3". Wish it can be addressed sooner. Alas, it's a combination of "It's a hard bug to fix" combined with "it's not _that_ impactful". If anyone's got clever ideas of how to solve that, we're all ears! We suspect it'll just get better when #8000 is finished as well, though it's anyone's guess when that'll be done.
Author
Owner

@ghost commented on GitHub (Nov 15, 2021):

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 commented on GitHub (Nov 15, 2021): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15855