-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
ConPTY VS Code Issue - ANSI escape sequences don't display correctly #12806
Comments
I believe that this is something that's already fixed in newer OS builds: The Terminal ships with an up-to-date ConPTY in the package, but VsCode needs to rely on the version that's shipped with the OS. I'm not totally sure which OS version these attributes started being supported in. I'd bet somewhere >=22000. |
Is that an insiders version of Windows 10? Mine is supposedly up to date. |
Nah, 22000+ builds are all Windows 11 |
Is there a file or something I can manually update instead? Is ConPTY a dll? |
ConPTY is actually just something that's built into You might be able to copy-paste a conhost from a Windows 11 machine onto a Windows 10 one, and it probably would work fine. That being said, there was another thread just this week about someone who was tying to move a conhost.exe between machines and experiencing quite a bit of difficulty. I wouldn't recommend it. If you try replacing your HERE BE DRAGONS |
Hahaha understood. Ugh. Thanks. |
Okay, so one more thing: What does Windows Terminal do differently? Does it link those conhost changes from a static library during its build or something? |
Yep. This worked (also made sure |
Sorta - Terminal actually just includes a whole conhost in its package, and doesn't directly call the conpty apis - it calls a slightly different version that calls into the conhost shipped in the package rather than the one in the OS. |
Whats happens if I copy |
It will not work, and you risk breaking your system. I wouldn't even try it. The version of conhost on Windows 7 uses a different communication protocol. We used to verify conhost.exe down to Windows 8.1. That was the first version that used the new communication protocol. It technically still works, but there are some minor DLL incompatibilities that would need to be worked around. |
Windows Terminal version
1.13.10733.0
Windows build number
10.0.19041.1415
Other Software
VS Code 1.66.0
Steps to reproduce
"terminal.integrated.minimumContrastRatio": 1
:Steps for Git Bash inside of VS Code:
cat print_term.txt
where the file in step 3 was savedSteps for Powershell inside of VS Code:
Get-Content -Path .\print_term.txt
where the file in step 3 was savedExpected Behavior
All terminal colors and most ansi sequences would be expected, but this is not the case.
Actual Behavior
Right now, my VS Code and Windows Terminal setup use the same color scheme. Both Git Bash and Powershell display the same way in each. In order to test this correctly, all 16 colors need to be unique.
This is what displays in VS Code on Windows:
This is what displays in Windows Terminal:
I originally opened up this issue with the vscode team, but they closed the issue and told me to take it up with you folks, due to the problem being related to conPTY:
microsoft/vscode#146474
Let me know if there's a way to fix this. Thanks.
The text was updated successfully, but these errors were encountered: