Repository navigation
unicode: fix VS15/VS16 check to consider emoji bases - #9679
Merged
Merged
Conversation
Contributor
|
Merged the base PR, can you rebase and update this? Thanks! It looks great! |
Contributor
Author
Done! |
mitchellh
approved these changes
Nov 24, 2025
mitchellh
left a comment
Contributor
There was a problem hiding this comment.
Logic and tests here are great, thanks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_baseinstead of theis_emoji_vs_emojiandis_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.