Skip to content
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

Bug: Missing characters when pasting green square emoji #379

Open
alxgnon opened this issue Jan 19, 2022 · 5 comments
Open

Bug: Missing characters when pasting green square emoji #379

alxgnon opened this issue Jan 19, 2022 · 5 comments
Labels

Comments

@alxgnon
Copy link

alxgnon commented Jan 19, 2022

I pasted this text into tiny IRC:
🟩🟩🟩🟩🟩

I got:
Screenshot_2022-01-19_18-24-17

For some reason there is only 3 squares instead of 5.

@trevarj
Copy link
Contributor

trevarj commented Jan 20, 2022

Ah yes, all multi-width (multi-cell) characters are not rendered properly in the tui. I can take a look at this.

@trevarj
Copy link
Contributor

trevarj commented Jan 20, 2022

Leaving this here for later: https://github.com/ridiculousfish/widecharwidth (see generated Rust code).

We can use it to get widths of wide characters (such as 🟩).

@osa1
Copy link
Owner

osa1 commented Jan 20, 2022

Wide character rendering in the message area should be supported, we use unicode_width for that:

let cw0 = UnicodeWidthChar::width(back_cell.ch).unwrap_or(1);

Without any investigation, I'm guessing this could be a bug in the input area.

@osa1 osa1 added the bug label Jan 20, 2022
@osa1
Copy link
Owner

osa1 commented Jan 20, 2022

Related: #306

@alxgnon
Copy link
Author

alxgnon commented Jan 20, 2022

Without any investigation, I'm guessing this could be a bug in the input area.

I've seen this bug in the chat log as well. Basically anywhere that there would be 2 consecutive squares, only 1 of them would show up.

Also, if I input one square emoji, and a letter afterwards, the square emoji will "swallow" the letter, in the input field and also in the chat log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants