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

Integrated terminal does not render inverted ANSI correctly on Windows #111762

Closed
JanDeDobbeleer opened this issue Dec 2, 2020 · 9 comments
Closed
Assignees
Labels
*not-reproducible Issue cannot be reproduced by VS Code Team member as described terminal General terminal issues that don't fall under another label terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Milestone

Comments

@JanDeDobbeleer
Copy link

JanDeDobbeleer commented Dec 2, 2020

Version: 1.51.1 (user setup)
Commit: e5a624b
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. Set VSCode in a light color scheme
  2. Execute the following command in the integrated Powershell console: Write-Host "`e[33;49m`e[7m Hello `e[m`e[0m"

Expected Behavior

The text Hello is shown in white on a yellow background.

Actual Behavior

The text Hello is shown in black on a yellow background

Does this issue occur when all extensions are disabled?: Yes

Relates to JanDeDobbeleer/oh-my-posh#182

@meganrogge meganrogge added the terminal General terminal issues that don't fall under another label label Dec 2, 2020
@meganrogge
Copy link
Contributor

have you tried changing the renderer type?

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Dec 2, 2020
@JanDeDobbeleer
Copy link
Author

have you tried changing the renderer type?

Good question, no I did not. I can try that tomorrow morning.

@JanDeDobbeleer
Copy link
Author

@meganrogge I tried this with every renderer type available and the issue persists. It's interesting to know this only occurs on Windows, MacOS and Linux work fine (regardless of the shell).

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Dec 3, 2020
@meganrogge meganrogge added this to the Backlog milestone Dec 3, 2020
JanDeDobbeleer added a commit to JanDeDobbeleer/oh-my-posh that referenced this issue Mar 14, 2021
relates to #529
relates to #322
relates to #497

Windors terminal and Visual Studio Code do not work well with inversted
ANSI sequences. This weak allows users to override the Tranparency to
the terminal background color removing black elements in their prompt.

Ideally we remove this once they are on par with other terminals, but
that could take a while.

See microsoft/vscode#111762
and microsoft/terminal#7014
JanDeDobbeleer added a commit to JanDeDobbeleer/oh-my-posh that referenced this issue Mar 14, 2021
relates to #529
relates to #322
relates to #497

Windors terminal and Visual Studio Code do not work well with inversted
ANSI sequences. This weak allows users to override the Tranparency to
the terminal background color removing black elements in their prompt.

Ideally we remove this once they are on par with other terminals, but
that could take a while.

See microsoft/vscode#111762
and microsoft/terminal#7014
@meganrogge
Copy link
Contributor

This is working for me
text

@meganrogge meganrogge added *not-reproducible Issue cannot be reproduced by VS Code Team member as described and removed bug Issue identified by VS Code Team member as probable bug labels Oct 7, 2021
@JanDeDobbeleer
Copy link
Author

@meganrogge thanks. It's also been 10 months since I reported this, so good to hear it's fixed in the meantime!

@floh96
Copy link

floh96 commented Oct 7, 2021

@meganrogge i initially reported the bug to oh-my-posh
i tested it again and it's still not working for me see screenshot
Unbenannt

VS Code version: Code - Insiders 1.61.0-insider (2dc8b95, 2021-10-06T08:22:53.147Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.74GB (5.30GB free)
Process Argv --crash-reporter-id 11168a8b-a8fc-489c-bed4-a714467b81b5
Screen Reader no
VM 0%

@Tyriar
Copy link
Member

Tyriar commented Oct 7, 2021

I can repro this as well:

image

I believe it's an issue in conpty as @meganrogge would be on a newer version of Windows that ships a newer conpty with bugs fixed.

@meganrogge meganrogge added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Oct 7, 2021
@Tyriar Tyriar added terminal-conpty Integrated terminal issues related to the ConPTY backend windows VS Code on Windows issues labels Oct 7, 2021
@floh96
Copy link

floh96 commented Oct 7, 2021

@Tyriar confirmed it's fixed in windows 11

@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*not-reproducible Issue cannot be reproduced by VS Code Team member as described terminal General terminal issues that don't fall under another label terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

5 participants
@Tyriar @JanDeDobbeleer @meganrogge @floh96 and others