You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens because when ratatui calculates the diff of the two terminal buffers, it will not skip the correct amount of cells. It seems to only skip 1 cell instead of the the 3 needed for this emoji. This causes it to overwrite the other cells, which deletes part of the emoji.
I am not exactly sure how the diff is calculated, but it looks like the to_skip value gets overwritten on each loop iteration, which makes it skip only 1 cell, instead of the 3 returned by current.symbol().width().saturating_sub(1).
This issue is only visible on terminals that correctly display this emoji over 4 cells, like kitty.
Description
When trying to display a zero-width joined emoji like π©βπ¬ (
"\u{1f469}\u{200d}\u{1f52c}"
), on kitty terminal, kitty will only display π© ("\u{1f469}"
).This happens because when ratatui calculates the diff of the two terminal buffers, it will not skip the correct amount of cells. It seems to only skip 1 cell instead of the the 3 needed for this emoji. This causes it to overwrite the other cells, which deletes part of the emoji.
I am not exactly sure how the diff is calculated, but it looks like the
to_skip
value gets overwritten on each loop iteration, which makes it skip only 1 cell, instead of the 3 returned bycurrent.symbol().width().saturating_sub(1)
.This issue is only visible on terminals that correctly display this emoji over 4 cells, like kitty.
Expected behaviour
Here's a test that should pass:
We instead get
The text was updated successfully, but these errors were encountered: