background colors extend to end of line when window is resized #16120

Closed
opened 2026-01-31 04:58:02 +00:00 by claunia · 2 comments
Owner

Originally created by @loganfred on GitHub (Dec 13, 2021).

If alternate background colors are used at the end of the printed line, resizing the window will cause the colors to propagate to the full extent of the window. This happens even when the background color is explicitly reset with whitespace characters that use the default color.

The expected behavior is that the color will continue to be confined to the correct string when the window is resized. This works as expected when the color change is in the middle of the line.

I have observed this issue in C# console applications and Powershell 7.2.0 (pictured). Windows Terminal Version: 1.11.2921.0.

image

pictured code:

Write-Host "Resizing this window does not " -NoNewLine ;`
Write-Host " FAIL " -ForegroundColor White -BackgroundColor Red -NoNewLine ; `
Write-Host "`t"
Originally created by @loganfred on GitHub (Dec 13, 2021). If alternate background colors are used at the end of the printed line, resizing the window will cause the colors to propagate to the full extent of the window. This happens even when the background color is explicitly reset with whitespace characters that use the default color. The expected behavior is that the color will continue to be confined to the correct string when the window is resized. This works as expected when the color change is in the middle of the line. I have observed this issue in C# console applications and Powershell 7.2.0 (pictured). Windows Terminal Version: 1.11.2921.0. ![image](https://user-images.githubusercontent.com/24829027/145882418-3b92c18e-c947-490c-9400-c7feb2837047.png) pictured code: ```powershell Write-Host "Resizing this window does not " -NoNewLine ;` Write-Host " FAIL " -ForegroundColor White -BackgroundColor Red -NoNewLine ; ` Write-Host "`t" ```
claunia added the Resolution-Duplicate label 2026-01-31 04:58:02 +00:00
Author
Owner

@DHowett commented on GitHub (Dec 13, 2021):

Thanks for the report! This is a /dupe of #32, one of our oldest issues.

@DHowett commented on GitHub (Dec 13, 2021): Thanks for the report! This is a /dupe of #32, one of our oldest issues.
Author
Owner

@ghost commented on GitHub (Dec 13, 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 (Dec 13, 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#16120