Skip to content

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

Closed as not planned

Description

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

Activity

  1. added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    Needs-Tag-FixDoesn't match tag requirements
    on Sep 3, 2024
  2. zadjii-msft commented on Sep 3, 2024

    @zadjii-msft
    Member

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

  3. vefatica commented on Sep 3, 2024

    @vefatica
    Author

    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

  4. added
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    and removed
    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something
    on Sep 3, 2024
  5. lhecker commented on Sep 4, 2024

    @lhecker
    Member

    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

  6. vefatica commented on Sep 4, 2024

    @vefatica
    Author

    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.

  7. lhecker commented on Sep 4, 2024

    @lhecker
    Member

    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.)

  8. added
    Resolution-By-DesignIt's supposed to be this way. Sometimes for compatibility reasons.
    Product-ConptyFor console issues specifically related to conpty
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    Needs-AttentionThe core contributors need to come back around and look at this ASAP.
    Needs-Tag-FixDoesn't match tag requirements
    on Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsProduct-ConptyFor console issues specifically related to conptyResolution-By-DesignIt's supposed to be this way. Sometimes for compatibility reasons.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions