From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: herdr maintainers <maintainers@herdr.dev>
Date: Wed, 15 Jul 2026 00:00:00 +0000
Subject: [PATCH] default lib-vt panes to grapheme clustering

Herdr renders libghostty-vt cells directly and requires DEC mode 2027 to
store multi-codepoint grapheme clusters in one terminal cell. Set it in the
terminal's default modes so RIS restores clustering instead of disabling it.

Herdr issue: https://github.com/herdrdev/herdr/issues/243
Vendored base: c5a21edfcbc2d5b46540ad91b7980aca31f5f1f3
---
diff --git a/vendor/libghostty-vt/src/terminal/c/terminal.zig b/vendor/libghostty-vt/src/terminal/c/terminal.zig
index 1c3b9f0c..a896c0fd 100644
--- a/vendor/libghostty-vt/src/terminal/c/terminal.zig
+++ b/vendor/libghostty-vt/src/terminal/c/terminal.zig
@@ -344,4 +344,5 @@ fn new_(
         .rows = opts.rows,
         .max_scrollback = opts.max_scrollback,
+        .default_modes = .{ .grapheme_cluster = true },
     });
     errdefer t.deinit(alloc);
