Skip to content

Bump libghostty to 0c2a290d3 - #688

Merged
dakra merged 2 commits into
mainfrom
chore/ghostty-bump
Sep 15, 2026
Merged

dakra merged 2 commits into
mainfrom
chore/ghostty-bump

Conversation

@dakra

@dakra dakra commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Updates the vendored ghostty-vt module from ab0b9da9e (2026-07-22) to 0c2a290d3 (2026-09-14) and adapts ghostel to the module API changes.

API adaptations

  • Terminal.Options.max_scrollback is now max_scrollback_bytes.
  • DynamicPalette.changeDefault takes an allocator and can fail; the palette setter propagates the error.
  • Stream.initAlloc is gone; streams use Stream.init with an options struct (three call sites).
  • The write_pty effect receives a plain slice instead of a sentinel-terminated one.
  • kitty.Image.data is now a union; image bytes are read through renderData().bytes().
  • kitty.graphics.Placement.Location gained a relative variant (P=/Q=/H=/V=). Relative placements rooted at a pin are drawn via the resolved parent chain, clipped on all four edges like upstream, with pruned anchor pins skipped. Chains rooted at a virtual placement are not drawn.

Stored kitty images are never PNG anymore (the decode hook converts them to RGBA at transmit time), so the PNG pass-through and the now-dead is-png parameter of the Elisp display functions are removed.

make -j8 all passes.

Behavior note

Upstream now deletes an image and its placements when an explicit id is retransmitted (ghostty commit e5747cf0b). Programs that recycle an image id, such as timg for runs in the same second, will see an earlier on-screen copy replaced rather than kept. This is intentional upstream behavior; ghostel still preserves copies already scrolled into materialized scrollback.

Adapt to the ghostty-vt module API since ab0b9da9e:

- Terminal.Options.max_scrollback is max_scrollback_bytes
- DynamicPalette.changeDefault takes an allocator and can fail
- Stream.initAlloc is gone; use Stream.init with an options struct
- the write_pty effect receives a plain slice
- kitty Image.data is a union; read it through renderData().bytes()
- kitty Placement.Location gained a relative variant, drawn via the
  resolved parent chain when it roots at a pin, clipped on all four
  edges like upstream, with pruned anchor pins skipped

Stored kitty images are never PNG anymore (the decode hook converts
them at transmit time), so the PNG pass-through and the is-png
parameter of the Elisp display functions are removed.
@dakra
dakra force-pushed the chore/ghostty-bump branch from f2a8fee to 2bdf4c3 Compare September 14, 2026 16:05
Two plain-ghostel (evil-free) regression scenarios plus their shared
setup helper. kitty-ghostel.json (GUI) covers pinned and relative
placements, deletion, the overlay path, virtual placeholders, and
placement eviction; scrollback-ghostel.json (TTY) covers eviction,
a DECSTBM region scroll, wrapped-line rejoin on a widening resize,
and a DECCOLM round trip.
@dakra
dakra force-pushed the chore/ghostty-bump branch from b0a5e33 to 7ddd90e Compare September 14, 2026 21:17
@dakra
dakra merged commit 7ddd90e into main Sep 15, 2026
33 checks passed
@dakra
dakra deleted the chore/ghostty-bump branch September 15, 2026 06:10
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