Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vefatica opened this issue Sep 3, 2024 · 5 comments
Closed

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

vefatica opened this issue Sep 3, 2024 · 5 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Conpty For console issues specifically related to conpty Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.

Comments

@vefatica
Copy link

vefatica commented 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

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 3, 2024
@zadjii-msft
Copy link
Member

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 3, 2024
@vefatica
Copy link
Author

vefatica commented 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

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 3, 2024
@lhecker
Copy link
Member

lhecker commented 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: PowerShell/PSReadLine#1626

@vefatica
Copy link
Author

vefatica commented 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.

@lhecker
Copy link
Member

lhecker commented 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 lhecker closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2024
@lhecker lhecker added Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. Product-Conpty For console issues specifically related to conpty Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements labels Sep 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Conpty For console issues specifically related to conpty Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests

3 participants