⚠️ emoji unicode length seems to be messing with visual output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.7k
- Forks
- 3.6k
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
-
I am on the latest Hyper.app version
-
I have searched the issues of this repo and believe that this is not a duplicate
-
OS version and name:
-- OS Name: Microsoft Windows 11 Pro
-- Version: 10.0.22621 Build 22621 -
Hyper.app version: 3.4.1
-
The issue is reproducible in vanilla Hyper.app: yes, the only add-on i have is the
hyper-material-themeand disabling it makes no difference
Issue
i checked through all open & closed issues with the word emoji and didn't see anything about this, but i apologize if this ends up being a duplicate.
the issue is that emojis don't seem to be handled correctly in terms of length. for example, if you open up python3 and run
>>> '⚠️' * 10
>>> '⚠️' * 79
and then press up-arrow twice you'll see the preview text as '⚠️' * 710 and if you press down-arrow you'll see '⚠️' * 779 even though if you hit enter on either, the text is actually still the original '⚠️' * 10 and '⚠️' * 79.
you can of course reproduce a similar issue in the normal command-line as well by following:
- type
⚠️into the console - press up-arrow twice to go to the command before
⚠️ - press down-arrow then up-arrow. every time you press down-arrow the first letter of the previous command will be appended visually to the current command, although the text still remains as
⚠️
the image below confirms these reproduction steps in action
i believe it has something to due with the fact that len('⚠️') == 2
Contributor guide
No contributing guide indexed for this repository
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 reproducing the command-history navigation steps in Hyper on Windows 11 and compare the visual command with the text that executes. Trace the terminal input and rendering path responsible for history previews and Unicode width, then verify that repeated ⚠️ characters display consistently and preserve the original command when submitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100