aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt.patches.md
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-16 23:28:05 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-16 23:29:28 +0300
commit4a3302d19a2baa3a33e910e0088c24e780905b90 (patch)
treedcaf76fae1c82102d933c9225b17ca7ac5d3a847 /vendor/libghostty-vt.patches.md
parent550e9f8cc085f428429f5cf2da0bb2dba897e8b8 (diff)
chore: update vendored libghostty-vt
refs #276
Diffstat (limited to 'vendor/libghostty-vt.patches.md')
-rw-r--r--vendor/libghostty-vt.patches.md76
1 files changed, 17 insertions, 59 deletions
diff --git a/vendor/libghostty-vt.patches.md b/vendor/libghostty-vt.patches.md
index 94bb998b..c01fa9b6 100644
--- a/vendor/libghostty-vt.patches.md
+++ b/vendor/libghostty-vt.patches.md
@@ -2,81 +2,39 @@
This file tracks intentional local changes applied on top of the vendored
`libghostty-vt` source. Remove a patch only when the vendored source commit
-contains the upstream fix and the listed verification still passes.
+contains the upstream behavior and the listed verification still passes.
-## 0001 backport resizeCols cursor subtraction saturation
+## 0001 default lib-vt panes to grapheme clustering
status: active
-patch: `vendor/patches/libghostty-vt/0001-backport-resizecols-cursor-subtraction.patch`
+patch: `vendor/patches/libghostty-vt/0001-default-grapheme-cluster-mode.patch`
-herdr issue: https://github.com/ogulcancelik/herdr/issues/465
+herdr issue: https://github.com/ogulcancelik/herdr/issues/243
-upstream discussion: https://github.com/ghostty-org/ghostty/discussions/12905
+upstream discussion: not opened; libghostty-vt currently exposes current mode mutation but no C API for configuring terminal default modes
-upstream pr: https://github.com/ghostty-org/ghostty/pull/12907
+upstream pr: not opened
-introduced upstream: `c44afa625`
-
-vendored base: `0f7cd84b880b203c98683e520e84b9db0c5938d8`
+vendored base: `c5a21edfcbc2d5b46540ad91b7980aca31f5f1f3`
local files:
-- `vendor/libghostty-vt/src/terminal/PageList.zig`
- `vendor/libghostty-vt/src/terminal/c/terminal.zig`
-reason: shrinking rows and columns in one resize can leave the pre-resize
-cursor row past the new row count. `PageList.resizeCols` then computed rows
-below the cursor with checked unsigned subtraction and aborted in safety builds.
-
-remove when: the vendored source commit contains upstream PR #12907 and the
-local ReleaseSafe resize regression tests pass without this patch.
-
-verification:
-
-```sh
-zig build test-lib-vt -Demit-lib-vt -Doptimize=ReleaseSafe -Dtest-filter="resize shrinks both axes with cursor at bottom"
-zig build test-lib-vt -Demit-lib-vt -Doptimize=ReleaseSafe -Dtest-filter="PageList resize less rows and cols cursor at bottom"
-```
-
-## 0002 expose kitty image transmit time in the C API
-
-status: active
-
-patch: `vendor/patches/libghostty-vt/0002-expose-kitty-image-transmit-time-ns.patch`
-
-herdr issue: https://github.com/ogulcancelik/herdr/issues/947
-
-upstream discussion: https://github.com/ghostty-org/ghostty/discussions/13177
-(proposes extending the kitty graphics inspection C API from
-https://github.com/ghostty-org/ghostty/pull/12145, which has no transmit
-time/serial accessor yet)
-
-introduced upstream: not yet
-
-vendored base: `0f7cd84b880b203c98683e520e84b9db0c5938d8`
-
-local files:
-
-- `vendor/libghostty-vt/include/ghostty/vt/kitty_graphics.h`
-- `vendor/libghostty-vt/src/terminal/c/kitty_graphics.zig`
-
-reason: herdr fingerprints kitty image data to decide when to re-encode an
-image for render clients. Hashing the full payload on every render is too
-expensive for multi-megabyte images, and sampling windows misses small
-changes, freezing streaming sources. The image's transmit time already
-refreshes on every (re)transmission, so exposing it as
-`GHOSTTY_KITTY_IMAGE_DATA_TRANSMIT_TIME_NS` gives herdr an exact, O(1) change
-serial to invalidate a cached full-data fingerprint.
+reason: Herdr renders terminal cells directly and requires DEC private mode
+2027 to store flags, ZWJ emoji, and other multi-codepoint grapheme clusters in
+one cell. This patch makes clustering active for new terminals and keeps it as
+the reset default so RIS (`ESC c`) does not disable it.
-remove when: the vendored source commit exposes the image transmit time (or an
-equivalent transmission serial) in the C API and
-`ghostty::tests::kitty_image_fingerprint_refreshes_on_retransmission` passes
-without this patch.
+remove when: libghostty-vt exposes a C API for setting default mode 2027, or
+upstream makes grapheme clustering the lib-vt default, and the reset-survival
+regression passes without this patch.
verification:
```sh
-zig build test-lib-vt -Dtest-filter="image_get transmit_time_ns changes on retransmission"
-cargo nextest run kitty_image_fingerprint
+cargo nextest run --locked grapheme_cluster_mode_is_default_and_survives_full_reset
+cargo nextest run --locked grapheme_cluster_mode_renders_flag_emoji_in_single_wide_cell
+cargo nextest run --locked grapheme_cluster_mode_renders_zwj_family_in_single_wide_cell
```