Skip to content

kitty graphics: support relative placements - #13939

Merged
mitchellh merged 6 commits into
mainfrom
kitty-relative
Aug 20, 2026
Merged

mitchellh merged 6 commits into
mainfrom
kitty-relative

Conversation

@mitchellh

@mitchellh mitchellh commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

This adds full support for relative placements: https://sw.kovidgoyal.net/kitty/graphics-protocol/#relative-placements (R= and Q=). The high-level description is that this allows images to be placed relative to other images. For more details, the spec explains it better than I can, or the demo video below.

The implementation here was pretty straightforward. It mainly revolved around adding parent resolution logic to puts (and validation), and proper unparented placement reaping in the right points, and then the various tests around that. The renderer logic itself was also straigthforward, I had to add some offset resolution to the core graphics storage but we can reuse that. The main complexity -- as always -- (MY OWN EMDASHES) is Unicode placeholders. But... also not too hard.

After this, the only feature we don't support from the protocol is animation.

AI usage: Test writing, validation against spec/reference, judging, and some "fill in the function/block". I setup the overall shape of the implementation.

Demo

Ghostty on the left, Kitty on the right

CleanShot.2026-08-20.at.15.21.25.mp4

@mitchellh mitchellh added this to the 1.4.0 milestone Aug 20, 2026
@mitchellh
mitchellh requested review from a team as code owners August 20, 2026 22:22
@mitchellh
mitchellh merged commit 08450e2 into main Aug 20, 2026
204 of 205 checks passed
@mitchellh
mitchellh deleted the kitty-relative branch August 20, 2026 22:46
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.

1 participant