Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Some of emojis are rendered correctly while typing but then incorrectly when displaying history.

Open tnymlr opened this issue 2 years ago • 1 comments

Discord username (optional)

No response

Describe the bug

Scottish flag emoji is displayed as black flag after executing a command.

You're doing the great job btw so far, in all other terminals I tried cursor jumps all over the place when you paste an emoji like that in the prompt, warp allows you to type it properly.

To Reproduce

Type

printf '🏴󠁧󠁢󠁳󠁣󠁴󠁿' | wc -m

Notice that the flag is rendered correctly. Press enter.

Expected behaviour

The terminal displays printf '🏴󠁧󠁢󠁳󠁣󠁴󠁿' | wc -m followed by number of bytes in the grapheme.

Screenshots

Screen Shot 2022-08-08 at 8 57 02 pm Screen Shot 2022-08-08 at 8 57 15 pm

Operating System

MacOS

OS Version

12.4

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.08.01.09.12.stable_02

Additional context

No response

Does this block you from using Warp daily?

No

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

No response

tnymlr avatar Aug 08 '22 11:08 tnymlr

Probably this will also help, this:

printf '👍🏾' | wc -m

is rendered as this in the history:

printf '👍 🏾' | wc -m but without the space, I had to remove the space so browser doesn't render the grapheme as single glyph.

tnymlr avatar Aug 11 '22 04:08 tnymlr

Thanks for the repro instructions. Will update you when we have some

elviskahoro avatar Aug 13 '22 23:08 elviskahoro

echo '->'

Using -> provides another example. I have changed the font to one that supports ligatures (should render roughly as →). When typing, I see the ligature (the real arrow). But on enter, the history shows the - and >.

It seems Warp DOES NOT render history with the chosen font. Why not?

When I copy/paste the history into my IDE (or other application), I see emojis and ligatures correctly again.

connorjs avatar Mar 08 '23 21:03 connorjs

For the Warp devs, to build on top of @tnymlr’s example, it seems to be an issue with any multi-code-point character.

echo '🌤 🏴󠁧󠁢󠁳󠁣󠁴󠁿'
Typed Rendered
typed rendered

You can see the code points on Emojipedia: Sun Behind Cloud (1 code point) and Flag for Scotland (7 code points).

The Flag for Scotland seems like a great test case given it represents a tag sequence.

connorjs avatar Mar 13 '23 03:03 connorjs