PowerShell colors weird after update to 1.22.2408.23002 (preview) #22212

Closed
opened 2026-01-31 08:06:39 +00:00 by claunia · 5 comments
Owner

Originally created by @vefatica on GitHub (Sep 3, 2024).

I have changed nothing here except for installing the latest WT builds, WindowsTerminal 1.21.2408.23001 and WindowsTerminal 1.22.2408.23002 (preview). The following is new behavior. It only happens in the 1.22 preview (not in 1.21 or in previous releases of any kind).

Whenever text on a command line in progress is erased (backspace, Esc, when scrolling through the history) the background color is replaced by black.

Before pressing Esc:

image

After pressing Esc:

image

Originally created by @vefatica on GitHub (Sep 3, 2024). I have changed nothing here except for installing the latest WT builds, WindowsTerminal 1.21.2408.23001 and WindowsTerminal 1.22.2408.23002 (preview). The following is new behavior. It only happens in the 1.22 preview (not in 1.21 or in previous releases of any kind). Whenever text on a command line in progress is erased (backspace, Esc, when scrolling through the history) the background color is replaced by black. Before pressing Esc: ![image](https://github.com/user-attachments/assets/bf8295af-a287-4058-83df-8217de26e2e5) After pressing Esc: ![image](https://github.com/user-attachments/assets/e16f2518-7b3c-4700-9dc5-c3427e549abc)
claunia added the Resolution-By-DesignIssue-BugNeeds-Tag-FixProduct-Conpty labels 2026-01-31 08:06:39 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Sep 3, 2024):

Which version of PowerShell are you using?
How do you have your prompt customized/?

@zadjii-msft commented on GitHub (Sep 3, 2024): Which version of PowerShell are you using? How do you have your prompt customized/?
Author
Owner

@vefatica commented on GitHub (Sep 3, 2024):

It's the built-in one called "PowerShell" (not PWSH); I'm on Windows 10.

In the user environment I have prompt=$e]9;9;"$P"$e\$e[91m$p$g$s$e[0m

@vefatica commented on GitHub (Sep 3, 2024): It's the built-in one called "PowerShell" (not PWSH); I'm on Windows 10. In the user environment I have `prompt=$e]9;9;"$P"$e\$e[91m$p$g$s$e[0m`
Author
Owner

@lhecker commented on GitHub (Sep 4, 2024):

This is an intentional regression we introduced to make many other major improvements possible, including sixels. It was removed in #17666. You can fix the issue by running Install-Module PSReadLine and restarting all of your PowerShell tabs (it may be necessary to add a -Force parameter if it was already installed).

The issue happens because Windows 10 ships with PSReadLine that contains a bug where the attributes are incorrect. The issue was fixed in the following PR which ships with Windows 11: https://github.com/PowerShell/PSReadLine/pull/1626

@lhecker commented on GitHub (Sep 4, 2024): This is an intentional regression we introduced to make many other major improvements possible, including sixels. It was removed in #17666. You can fix the issue by running `Install-Module PSReadLine` and restarting all of your PowerShell tabs (it may be necessary to add a `-Force` parameter if it was already installed). The issue happens because Windows 10 ships with PSReadLine that contains a bug where the attributes are incorrect. The issue was fixed in the following PR which ships with Windows 11: https://github.com/PowerShell/PSReadLine/pull/1626
Author
Owner

@vefatica commented on GitHub (Sep 4, 2024):

Thanks for the info. It's no big deal to me. I'm no fan of PowerShell (in any form) and I do have an up-to-date (?) PWSH which does not exhibit the behavior in question. If I hide WT's "PowerShell" profile, I won't be tempted to run the old one.

@vefatica commented on GitHub (Sep 4, 2024): Thanks for the info. It's no big deal to me. I'm no fan of PowerShell (in any form) and I do have an up-to-date (?) PWSH which does not exhibit the behavior in question. If I hide WT's "PowerShell" profile, I won't be tempted to run the old one.
Author
Owner

@lhecker commented on GitHub (Sep 4, 2024):

I've updated my comment with relevant links. I'll close this issue for now since I broke it intentionally (see #17666).

(Side note: It can theoretically be fixed by adding a new InjectionType but I don't think we should, because these injections go against the fundamental concept of VT passthrough.)

@lhecker commented on GitHub (Sep 4, 2024): I've updated my comment with relevant links. I'll close this issue for now since I broke it intentionally (see #17666). (Side note: It can theoretically be fixed by adding a new `InjectionType` but I don't think we should, because these injections go against the fundamental concept of VT passthrough.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22212