-
Notifications
You must be signed in to change notification settings - Fork 295
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
In 6.2.3 and above PSReadLine causes 'backspace' in posh-git + Windows Terminal #1078
Comments
Quoted from dahlbyk/posh-git#704 (comment)
|
Then that makes this related to #1054. Character width is determined by the font … I don't know if PSReadLine has anyway it can determine this when its behind a terminal. Can the current character position be polled through a VT sequence? Spit out a character, poll the new cursor position, etc...? |
Might be different. The linked issue description mentioned that it happens on Windows Terminal only:
|
Correct. I was unable to reproduce in any host other than Windows Terminal. Additionally, while the character width issue may be the culprit, my instincts say this is in PSReadline as @rkeithhill and I tested a PS 6.2.3 session in Windows Terminal WITHOUT PSReadLine loaded...and the font appeared correctly without the backspace issue. |
If the issue is in fact that sometimes (some fonts) the |
Difference in hosts could simply be the default font, or not demonstrating the issue using the same path and same Posh Git connections. Also, as you type, PSReadLine may modify the color of previous parts of the command line, more reason that the cursor has to be moved, and why PSReadLine needs an accurate estimate of the cursor position. |
See microsoft/terminal#2928 where they are assuming ambiguous width characters are 1 character. Note that PSReadLine hard codes the characters that are double width here. |
Should emoji be / are they part of that list @lzybkr ? |
Note in my link above the commented out code for surrogate pairs. Emoji have the same issue I think. |
Specifically microsoft/terminal#2928 will enforce all ambiguous width chars being one cell wide -- this will fix this bug. |
Woot. Thanks. |
microsoft/terminal#2928 was merged, so closing this issue. |
Environment data
Steps to reproduce or exception report
Please see this posh-git Issue for more details: dahlbyk/posh-git#704
@rkeithhill
The text was updated successfully, but these errors were encountered: