-
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
Extra space cell inserted after unicode character #6162
Comments
This is wild. Through-and-through, the infrastructure believes this to be a single-cell glyph. We're doing the right thing by the UCD, but then when the pseudoconsole emits it it emits it with an additional cursor move.
|
(And of course, only when there's a color run break. This sound ominously related to our attribute run splitter and how it thinks the cursor moves when it splits runs.) |
I think this is actually a conhost problem - you'll see the same issue there. The conpty sequence is just trying to reproduce the state of the conhost buffer which is already incorrect. And the color change isn't really what's triggering it - any control character will do. The state machine splits up runs of text separated by control characters. And once a run of text is written, the cursor position is moved forward the expected number of columns (which in this case is off by 1). The next run of text is then starting in the wrong position, so you get a gap. And the reason why it's off by 1 is because the character is processed as a surrogate pair, which the |
I have another arrow example which I believe is related: The robbyrussell prompt for zsh and fish uses the "➜" (U+279C) character. In MS Terminal however, it renders as a single arrow followed by space (again, with first char selected): FWIW:
Do VS Code and MS Terminal share some of the underlying infrastructure in that regard? If so, one could take a look at how it works over there? |
There's a similar issue with the |
I face a similar issue as described on oh-my-posh/issues#3088 The font I use is Caskaydia Cove Nerd Font Oh My Posh v12.14.0 Windows Terminal - Version: 1.15.2875.0 |
🎉This issue was addressed in #14640, which has now been successfully released as Handy links: |
Environment
Steps to reproduce
Write the following string to the terminal (Python):
This string is a unicode box char, followed by a foreground yellow escape, a unicode arrow, a reset escape, and another box character.
Expected behavior
The string should render three characters: a vertical line, yellow arrow, vertical line.
Actual behavior
There is an extra space after the arrow.
Note that this only occurs with that particular unicode character. If I replace that unicode arrow with any other character then it renders as expected.
The text was updated successfully, but these errors were encountered: