Can't see what I type ("-", "%", etc are not displayed) #8922

Closed
opened 2026-01-31 01:41:27 +00:00 by claunia · 5 comments
Owner

Originally created by @CIPop on GitHub (Jun 9, 2020).

Originally assigned to: @DHowett on GitHub.

Environment

Windows build number:  Win32NT             10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): Windows Terminal (Preview) Version: 1.0.1402.0

Any other software?

            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false, 
                "fontFace": "Cascadia Code PL",
                "fontSize": 8,
                "colorScheme": "Solarized Dark"
            },

Steps to reproduce

Enter git -m "123"
Enter test -- -- -- -- -- -- -- -- -- --

Expected behavior

I expect to see what I typed.

Actual behavior

image
image

Originally created by @CIPop on GitHub (Jun 9, 2020). Originally assigned to: @DHowett on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Win32NT 10.0.19041.0 Microsoft Windows NT 10.0.19041.0 Windows Terminal version (if applicable): Windows Terminal (Preview) Version: 1.0.1402.0 Any other software? { // Make changes here to the powershell.exe profile. "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false, "fontFace": "Cascadia Code PL", "fontSize": 8, "colorScheme": "Solarized Dark" }, ``` # Steps to reproduce Enter `git -m "123"` Enter `test -- -- -- -- -- -- -- -- -- --` # Expected behavior I expect to see what I typed. # Actual behavior ![image](https://user-images.githubusercontent.com/8635911/84101282-6e72fa80-a9c2-11ea-8c6b-3878da30a948.png) ![image](https://user-images.githubusercontent.com/8635911/84101342-94989a80-a9c2-11ea-8bf3-df52a5bddfdc.png) <!-- What's actually happening? -->
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 01:41:27 +00:00
Author
Owner

@DHowett commented on GitHub (Jun 9, 2020):

I cannot recommend the solarized color scheme. The defaults in PowerShell do not interact with it properly. I recommend choosing literally any other theme. Sorry!

@DHowett commented on GitHub (Jun 9, 2020): I cannot recommend the solarized color scheme. The defaults in PowerShell do not interact with it properly. I recommend choosing literally any other theme. Sorry!
Author
Owner

@CIPop commented on GitHub (Jun 9, 2020):

@DHowett No can do: all other schemes are literally wrong 😜. (I was also not asking for a recommendation: I was pointing out a real bug.)

Joke aside: Cmder works just fine with the same scheme in powershell:
image

Any workarounds I can do right now to make it work like forcing the console foreground color?

Please re-open the issue: if you don't/can't support solarized, please remove the theme (using this bug to track). If you can fix it, please use this issue to track the resolution.

@CIPop commented on GitHub (Jun 9, 2020): @DHowett No can do: all other schemes are literally wrong 😜. (I was also not asking for a recommendation: I was pointing out a real bug.) Joke aside: Cmder works just fine with the same scheme in powershell: ![image](https://user-images.githubusercontent.com/8635911/84102723-15a56100-a9c6-11ea-9f9f-408958a0f4ff.png) Any workarounds I can do right now to make it work like forcing the console foreground color? Please re-open the issue: if you don't/can't support solarized, please remove the theme (using this bug to track). If you can fix it, please use this issue to track the resolution.
Author
Owner

@DHowett commented on GitHub (Jun 9, 2020):

(I’m assigning myself to fill in the discussion and handle this bug when I’m not on my phone.)

@DHowett commented on GitHub (Jun 9, 2020): (I’m assigning myself to fill in the discussion and handle this bug when I’m not on my phone.)
Author
Owner

@DHowett commented on GitHub (Jun 10, 2020):

So, there's a few issues at play here.

  1. PowerShell defaults to printing parameters in "bright black" (silly name for gray); this is verifiable with Get-PSReadlineOption in a terminal that isn't set to Solarized right now. image
  2. It looks like the official Solarized palette makes the "bright black" color invisible or barely visible: https://github.com/altercation/solarized/issues/220 https://github.com/altercation/solarized/issues/376
  3. Terminal is crushing some colors out of existence (#2661, #293, don't mind the fact that 293 mentions only the background)
    • PowerShell can be mildly reconfigured to work around issues two and three (footnote 1)
  4. We don't have a color bumping algorithm yet. Cmder (which is actually just ConEmu) does, using DeltaE101. When two colors are too close to eachother, it will nudge them until they're not quite so close. We're tracking that in #2638.

(1)

Set-PSReadLineOption -Colors @{ Parameter = "`e[38;5;239m"; Operator = "`e[38;5;239m"; }

This will actually force parameters/operators to be gray. Real gray. The way they were intended. It's equally unreadable on the standard Solarized Dark background, but it is at the very least visible.

@DHowett commented on GitHub (Jun 10, 2020): So, there's a few issues at play here. 1. PowerShell defaults to printing parameters in "bright black" (silly name for gray); this is verifiable with `Get-PSReadlineOption` in a terminal that isn't set to Solarized right now. ![image](https://user-images.githubusercontent.com/189190/84217854-16033200-aa82-11ea-9b1b-fb307b16e607.png) 2. It looks like the official Solarized palette makes the "bright black" color invisible or barely visible: https://github.com/altercation/solarized/issues/220 https://github.com/altercation/solarized/issues/376 3. Terminal is crushing some colors out of existence (#2661, #293, don't mind the fact that 293 mentions only the background) * PowerShell can be mildly reconfigured to work around issues two and three (footnote 1) 4. We don't have a color bumping algorithm yet. Cmder (which is actually just ConEmu) _does_, using DeltaE101. When two colors are too close to eachother, it will nudge them until they're not quite so close. We're tracking that in #2638. --- (1) ``` Set-PSReadLineOption -Colors @{ Parameter = "`e[38;5;239m"; Operator = "`e[38;5;239m"; } ``` This will actually force parameters/operators to be _gray_. Real gray. The way they were intended. It's equally unreadable on the standard Solarized Dark background, but it is at the very least _visible_.
Author
Owner

@CIPop commented on GitHub (Jun 10, 2020):

Correction above: `e works only for PS running on .NET Core.

From https://github.com/microsoft/terminal/issues/5896#issuecomment-628616699

if ($IsCoreCLR) {
    $esc = "`e"
}
else {
    $esc = $([char]0x1b)
}

Set-PSReadLineOption -Colors @{
    Parameter = "$esc[96m"
    Operator  = "$esc[38;5;47m"
    comment   = "$esc[92m"
    String    = "$esc[38;5;51m"
}

This works just fine with Solarized Dark:
image

@CIPop commented on GitHub (Jun 10, 2020): Correction above: `e works only for PS running on .NET Core. From https://github.com/microsoft/terminal/issues/5896#issuecomment-628616699 ```pwsh if ($IsCoreCLR) { $esc = "`e" } else { $esc = $([char]0x1b) } Set-PSReadLineOption -Colors @{ Parameter = "$esc[96m" Operator = "$esc[38;5;47m" comment = "$esc[92m" String = "$esc[38;5;51m" } ``` This works just fine with Solarized Dark: ![image](https://user-images.githubusercontent.com/8635911/84323387-8f0a9400-ab2b-11ea-8a64-eacb80d613b2.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8922