Fix hang wrapping OSC-8 hyperlinks with wide graphemes#232
Open
jquast wants to merge 7 commits into
Open
Conversation
When wrap width is 1 and an open hyperlink precedes a wide/emoji grapheme, the wrap loop never advanced. Advance past the grapheme.
_find_first_visible_break fully supersedes the old force-progress path.
It can't be reached, guarded by conditional before calling _handle_long_word
jquast
force-pushed
the
fix/wrap-hyperlink-wide-hang
branch
from
July 22, 2026 02:02
05c8dc9 to
de55177
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #232 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 1967 1973 +6
Branches 462 464 +2
=========================================
+ Hits 1967 1973 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 10.34%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_width_wcswidth_consistency_udhr |
489.5 ms | 443.6 ms | +10.34% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/wrap-hyperlink-wide-hang (45f66a3) with master (614156b)
jquast
marked this pull request as ready for review
July 22, 2026 02:53
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.
Supersedes #231 with missing coverage, this statement caused
wcwidth.wrap()to loop forever, reported and fixed by @santhreal: