Skip to content

unicode: fix VS15/VS16 check to consider emoji bases - #9679

Merged
mitchellh merged 7 commits into
ghostty-org:mainfrom
jacobsandlund:vs-correctness
Nov 24, 2025
Merged

mitchellh merged 7 commits into
ghostty-org:mainfrom
jacobsandlund:vs-correctness

Conversation

@jacobsandlund

@jacobsandlund jacobsandlund commented Nov 24, 2025 •

Copy link
Copy Markdown
Contributor

This PR builds on #9678 so the diff from there is included here (it's not possible to stack PRs unless it's a PR against my own fork)--review that one first!

This PR fixes an issue with the VS15/VS16 handling in terminal print, where before we didn't check for valid sequences if the base code point is an emoji. This meant that a VS15 after an emoji that isn't part of a valid sequence would narrow the cell, despite that the emoji doesn't have a text presentation.

This PR also uses a single is_emoji_vs_base instead of the is_emoji_vs_emoji and is_emoji_vs_text. See the uucode comment for why I'm recommending this.

AI was used in some of the uucode changes in #9678 (Amp--primarily for tests), but everything was carefully vetted and much of it done by hand. This PR was made without AI.

@jacobsandlund
jacobsandlund requested a review from a team as a code owner November 24, 2025 14:34
@mitchellh

Copy link
Copy Markdown
Contributor

Merged the base PR, can you rebase and update this? Thanks! It looks great!

@jacobsandlund

Copy link
Copy Markdown
Contributor Author

Merged the base PR, can you rebase and update this? Thanks! It looks great!

Done!

@mitchellh mitchellh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic and tests here are great, thanks.

@mitchellh mitchellh added this to the 1.3.0 milestone Nov 24, 2025
@mitchellh
mitchellh merged commit 98e7c17 into ghostty-org:main Nov 24, 2025
@jacobsandlund
jacobsandlund deleted the vs-correctness branch November 24, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants