-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
In terminal emulators, bash fails to render correct background color #88
Comments
From @zadjii-msft on July 17, 2017 16:35 I believe this is already fixed in Insider's builds - I believe it's a dupe of #1706 |
From @Elderry on October 18, 2017 5:50 @zadjii-msft I'm afraid this issue remains, today my Windows updated to: Microsoft Windows [Version 10.0.16299.19], and I reinstalled Ubuntu using Microsoft Store. |
From @zadjii-msft on October 18, 2017 15:56 Hmm. That's certainly weird. @Elderry Can you open a powershell window, and post a screenshot of the colors tab of the property sheet? |
From @Elderry on October 19, 2017 1:25 @zadjii-msft Here it is: |
From @zadjii-msft on October 19, 2017 15:22 @Elderry Okay, this is gonna sound crazy, but what happens if you switch the first and last values of the color table in the Powershell properties dialog, and instead choose the first color (now white) as your "Screen Background" and the last (now black) as the "Screen Text", then open a new vscode? |
From @Elderry on October 23, 2017 2:1 @zadjii-msft I did as you say, nothing changes: |
From @zadjii-msft on October 23, 2017 17:30 Okay shoot. I was hoping that might help. Can you try pasting this file into a file called |
From @Elderry on October 24, 2017 1:30 |
From @Elderry on October 24, 2017 1:38 @zadjii-msft Seems it is an upstream issue caused by winpty referred here. |
From @zadjii-msft on October 24, 2017 16:1 Oh, that's not the issue I was mostly concerned about. I was more concerned about the white and black entries in the first 8 colors printed are reversed in VScode from what you'd expect. I think I have an idea of how this happened. If you look in the registry, under I think VSCode is using the console defaults, not the properties. So because your default color selection is Color00 (dark_black) text on Color15 (bright_white) background, and VScode changes 00->white and 15-> black, your "default" colors in vscode are white on black, even if the rest of the background is white. If you really want black text on white for all of your terminals, then I'd just replicate VSCode's behavior in your defaults manually, and switch the first and last entries of the "Defaults" in the console settings. |
From @Elderry on October 25, 2017 2:16 @zadjii-msft You are right, my Now my problem is why vscode choose to changes 00->white and 15->black, even Intellij IDEA's integrated terminal does the same. |
It seem this issued is fixed in windows 10 1803. |
@Elderry how this get fixed on 1803? |
I tested it again and confirmed 1803 fixed part of this issue. @david50407 You can compare this capture to the above, the mainly difference is that the black background no longer overflow. Though white and black entries are still reversed, the pain point for me no longer exists. |
@Elderry oh ok thanks But the color cube still broken in 3rd-party terminal simulators... |
Correct, our API We've been focusing on #57 instead to allow 3rd-party terminals to receive this information on a standard PTY stream like other platforms instead. |
I'm sad to say that this issue re-occurred in Windows 10 1809. |
From @Elderry on July 17, 2017 8:2
My Windows build number: Microsoft Windows [Version 10.0.15063]
It seems that in many terminal emulators, after running a command that outputs colors to the terminal using bash, the background will become a strange gray or black. But the default Windows Console doesn't has this problem. Here are the examples:
Integrated Terminal of Visual Studio Code:
Integrated Terminal of Intellij IDEA:
Default Windows Console:
To provide more detail, here is my bash prompt:
Copied from original issue: microsoft/WSL#2344
The text was updated successfully, but these errors were encountered: