-
Notifications
You must be signed in to change notification settings - Fork 70
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
Emoji in default output causes width calculation to be incorrect #71
Comments
Terminals all render emoji widths differently, so this isn't something I intend to mitigate personally. It's a known issue with how monospaced fonts, terminal renderers and Unicode interact. Happy to leave this open if someone wants to try to tackle this, but forewarning that it's an endless pit of despair and nothing good comes of it. tl;dr computers mean we can't have nice things. haha |
😂 |
Hum, this may not be the time sink I expect. There's a crate: https://github.com/unicode-rs/unicode-width We could just use this. It won't fix everything I suspect, but it'll work in more cases than we currently handle. Slap this everywhere I currently did a width calculation and we'll have a better life. |
Definitely read unicode-rs/unicode-width#4 if you're going to tackle this, though. Maybe I removed time sink too soon, I'll put it back, ahaha |
Fixed in #128 |
One of my step has two emojis in its name (🦀). This seems to break the terminal width calculation used to send the file/number on the right side. See how the column number (9) gets sent to a new line in the screenshot:
I suspect it could be caused by bad calculation of the emoji's UTF-8 width. Interestingly, the problem does not happen if I have one emoji in the name. Weird... 🤔
EDIT: This is on macOS Catalina 10.15.6 using iTerm2 3.3.12 and tmux.
The text was updated successfully, but these errors were encountered: