Repository navigation
Draw small pictures like emoji inside their line - #158
Closed
HarryCordewener wants to merge 1 commit into
Closed
HarryCordewener wants to merge 1 commit into
HarryCordewener wants to merge 1 commit into
Conversation
A custom emoji relayed from Discord arrives as an MXP IMAGE with W=22 in the middle of a say. Every picture that was not given reserved cells went under its line, so the say read 'says, ""' with the emoji on the rows below. A picture whose size hint is at most 32 px (or one row tall, or two cells wide with no height) is now a one-row slot over its label, drawn at its own width so the text after it closes up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7WAdxrhzJfxpEMBp3e
HarryCordewener
marked this pull request as ready for review
November 30, 2026 23:36
|
Caution Review failedThe pull request is closed. WalkthroughGlyph-sized inline pictures now render in a one-row slot at the label position when their size hints meet the specified limits. Other pictures retain their existing placement behavior. Tests cover the size classification, inline position, link, and line layout. ChangesInline Picture Rendering
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers:
|
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.
Requested by Grave · project thread
Problem
A custom emoji relayed from Discord reaches SharpMUTerm as an MXP
ˋ<IMAGE … W=22>ˋin the middle of a say. SharpMUTerm drew every picture that had no server-reserved cells on rows under its line and took the label off the line, so the say readAda says, ""with the emoji on the next rows.The server's output is correct (one
IMAGEtag where the emoji is, sized 22 px); the line break came from the client's placement rule.Change
SharpMUTermApp.IsGlyphSized).PictureSlots.Fitted: such a picture is not padded to its label's width, so the text after it closes up.Tests
MxpImageTests: a 22 px picture inAda says, "Hi … there"renders asAda says, "Hi ▀▀ there"with no extra rows and keeps its link; the size rule is checked for 22, 32, 33, 160 px and with a height hint.Generated by Claude Code
Summary by CodeRabbit