-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
ANSI color code interpretation broken in terminal #31326
Comments
@oliversalzburg can you setup a small project/set of files that demonstrates the issue? |
I'm having a really hard time isolating the issue due to how complex the scenario appears to be. However this is where I'm at right now: https://github.com/oliversalzburg/vscode-31326 To give some insight into what is happening. Now, if you don't have gpg signing of commits enabled, you won't see the issue. Simple output to the console will also not break the terminal. For example, when What is especially interesting here is that all |
@rprichard any ideas why this would be happening? |
My guess: node.js turns |
@oliversalzburg Does this issue reproduce in an ordinary Windows console? e.g. using Start -> Run, run this command:
Don't use mintty, and don't use ConEmu. If you have ConEmu configured to handle all new console windows, you may have to disable that option temporarily. I see the same behavior if I run this JavaScript code (Windows 10 v2 console, 10.0.10563, with MSYS2 // FWIW, I'm using node v8.1.0
const { spawnSync } = require("child_process");
process.stdout.write("\x1b[32m" + "color" + "\x1b[0m" + "\n");
spawnSync("gpg.exe", ["--foo-bar"], {stdio: "inherit"});
process.stdout.write("\x1b[32m" + "color" + "\x1b[0m" + "\n"); FWIW, the standalone Here are some comments I made the last time I looked into this VT mode flag: rprichard/winpty#92 (comment). |
@rprichard Seems like you're right and this is not specific to VS Code. When I run the command from No idea why it works in ConEmu and I could have sworn this worked fine in VS Code previously. I even ran into a similar issue today, which happens when I cancel running unit tests: All of this seems new to me. But maybe a Windows 10 update is to blame? |
By default, ConEmu injects a hook DLL into processes attached to its hidden underlying console (which it calls the "RealConsole"). The ConEmu DLL overrides functions like WriteFile and WriteConsole{A,W} to interpret VT escape sequences. This ConEmu ability preceded the official Win10 v2 console support for VT escapes, which is controlled by the
Lots of possibilities:
|
Closing as it looks to be at the Windows level 😃 |
Steps to Reproduce:
When I issue certain commands in the terminal, color code interpretation seems to break at certain points in the output:
I don't know what it is specifically about the output that breaks the interpreter, but I can reproduce this at will with the CLI application I am using there.
To my knowledge, this worked previously and this works fine in other terminals.
The text was updated successfully, but these errors were encountered: