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

Prompt input does not handle emoji grapheme clusters #4191

Open
paperdave opened this issue Feb 18, 2024 · 6 comments
Open

Prompt input does not handle emoji grapheme clusters #4191

paperdave opened this issue Feb 18, 2024 · 6 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@paperdave
Copy link

Discord username (optional)

paperdave.net

Describe the bug

warp's input buffer is unusable when using certain multi-codepoint emojis. i dont seem to reproduce this for all grapheme cluster types, just emojis.

To reproduce

  • paste one of "🏳️‍⚧️", "❤️", "❤️‍🔥" into a block input
  • look at what is echoed

Expected behavior

i would like to see one grapheme, similar to other terminals

image

but ideally, the cursor is actually sticks at the end of the single grapheme, since this is a GUI app with a gui text input; this prompt does not need to abide by wcrules.

support for proper grapheme cluster support is opened in #4190, which covers this more broadly.

Screenshots

(this is 🏳️‍⚧️)
image

Operating system

MacOS

Operating system and version

MacOS 13.6

Shell Version

fish, version 3.6.1

Current Warp version

v0.2024.02.13.08.02.stable_00

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

This seems distinct from #1995 as this issue is looking at prompt and not the output. when used in a non-warpify shell, this emoji kind of renders differently

image

i think resolving this is covered by that issue or a new issue.

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

@paperdave paperdave added the Bugs Bugs, Hangs, Crash, and Freezes label Feb 18, 2024
@dannyneira
Copy link
Member

Hey @paperdave what font are you using? I recommend nerd fonts which contain a lot more characters. I also recommend a custom prompt like p10k which will help with displaying characters correctly in the setup.

Prompt Docs: https://docs.warp.dev/appearance/prompt#custom-prompt-compatibility-table
P10k setup: https://www.youtube.com/watch?v=dIV9Cso4Mi8

@paperdave
Copy link
Author

image

I am using the default configuration. This should not require additional setup, nerd fonts, or anything else.

Furthermore, this happens on every font I tried, including my main one 'Rec Mono Duotone' which is the font I usually use. Note that all other terminals handle this in either two ways

  • Display the cluster correctly
  • Display multiple components, which is not correct but still readable and does not mess up the prompt.

@Advait-M
Copy link
Member

Heyo! We now support Emoji Presentation Selectors from Unicode in Warp 😄 i.e. stuff like ❤️ and ☁️ should be correctly rendered! We implemented this as a part of #2304 (for better Starship prompt support in fish with chips such as gcloud).

Note that there's a bug with Zsh that results in slight spacing issues (not the case in bash/fish) - see https://www.zsh.org/mla/workers/2024/msg00481.html for some discussion on that front.

Though, there's additional Unicode specifications we need to support in order to support some of the other emoji mentioned here e.g. 🏳️‍⚧️

As such, I'm going to leave this issue open for now, until we get around to better support for those!

@paperdave
Copy link
Author

paperdave commented Jun 27, 2024

this is definetly an improvement. but either Warp stable does not have the changes for emoji presentation selectors, or it does not fully work (macOS 14).

notice how ❤️ is rendered as ❤. you can backspace the variation selector separately from the entire unit. the same applies to ☁️.

❤️‍🔥 and 🏳️‍⚧️ is rendered OK with the zero with joiner being invisible and both. this is a huge improvement over the garbled text originally.

image

@paperdave paperdave changed the title Typing certain emoji characters do not render well in prompt Prompt input does not handle emoji grapheme clusters Jun 27, 2024
@Advait-M
Copy link
Member

Ah, to clarify @paperdave: this is in finished blocks! Fixing emoji presentation selector support in the input editor is a known issue and we'll prioritize this later (no concrete ETA here unfortunately)

image

@Advait-M
Copy link
Member

(in addition to more broadly supporting grapheme clusters throughout both later!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests

4 participants