-
Notifications
You must be signed in to change notification settings - Fork 166
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
Escape/transform U+001B when it appears in the Windows console #47
Comments
See also: #43 and https://youtrack.jetbrains.com/issue/IDEA-155071 |
I noticed today a few instances where '\x1b' seemed to be translated to something other than '?'.
In VSCode, the NUL character occupies 0 columns. It might make sense to also translate U+0000 to '?'. (or maybe space?) IIRC, I didn't originally translate U+001B to U+2190, because the left arrow codepoint's width is ambiguous, and it might have displayed as 2 columns in some CJK fonts on Windows. |
Currently, if a console cell contains U+001B, winpty copies it through to the terminal. This behavior wasn't ever intentional, and now that I've noticed it, I think it should be changed, probably by replacing U+001B with another character like a space, a question mark, or perhaps U+FFFD (�). winpty generally tries to keep the terminal looking like the console, and the console does not interpret escape sequences.
This behavior is arguably a feature. For example, this currently works, assuming default colors and a wide enough mintty terminal:
In mintty, the text is struck through, like
.CROSSED
In the winpty's underlying console, this is what appears:
The ability breaks easily, though. If the escape sequence wraps around a line, winpty will typically insert its own control sequences (or at least CR and LF) into the console's escape sequence. The ability also interferes with winpty's color handling and cursor positioning.
If a Windows console program's escape sequences are interpreted, they should be interpreted without writing them to the console screen buffer.
The text was updated successfully, but these errors were encountered: