fix(renderer): keep kitty image placeholders (U+10EEEE) out of OSC 66 text-sizing - #1301
Open
arthurkatcher wants to merge 1 commit into
Open
Conversation
arthurkatcher
requested review from
Hona,
kommander,
msmps and
simonklee
as code owners
July 29, 2026 20:49
arthurkatcher
force-pushed
the
fix/kitty-placeholder-explicit-width
branch
from
July 29, 2026 20:57
7da0877 to
a43512b
Compare
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.
Summary
Fixes #1300.
When
explicit_widthis enabled, both diff-emit paths wrapped every pooled grapheme in OSC 66 text-sizing, including U+10EEEE, the kitty graphics protocol's Unicode placeholder. kitty only recognizes plain U+10EEEE cells as image placements, so wrapped placeholders render as blank cells exactly where a transmitted image should appear. kitty >= 0.40 answers the text-sizing probe, soexplicit_widthis on by default in real kitty sessions and the placeholder flow is broken out of the box.This change skips
explicitWidthOutputfor graphemes that start with U+10EEEE (bare or carrying row/column diacritics) in both call sites inrenderer.zig. All other graphemes keep explicit-width output.Verification
explicit_width = truethroughTestRendererand asserts the emoji is still OSC 66 wrapped while the placeholder cells go out bare. Red on main (fails on the wrapped-placeholder assertion), green with the fix.bun run test:nativefrompackages/core: 1709/1715 passed, 6 skipped, 0 failed.explicit_widthis genuinely enabled through detection rather than forced. Captured output shows the control emoji wrapped in]66;w=2;while all placeholder cells are emitted bare; before the patch every placeholder cell was wrapped.a=T,U=1and placed via placeholder cells rendered as blank space; with this change kitty draws them correctly.zig fmtclean on both files.