Prompt input does not handle emoji grapheme clusters
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 65.1k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
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
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 🏳️⚧️)
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
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the broader grapheme-cluster work referenced in issue #4190 and reproduce the prompt behavior with 🏳️⚧️, ❤️, and ❤️🔥 on macOS. Done means each pasted emoji is echoed as one grapheme and the cursor remains at its end, matching the expected terminal behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100