diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-16 23:28:05 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-16 23:29:28 +0300 |
| commit | 4a3302d19a2baa3a33e910e0088c24e780905b90 (patch) | |
| tree | dcaf76fae1c82102d933c9225b17ca7ac5d3a847 /vendor/libghostty-vt/src/termio/Termio.zig | |
| parent | 550e9f8cc085f428429f5cf2da0bb2dba897e8b8 (diff) | |
chore: update vendored libghostty-vt
refs #276
Diffstat (limited to 'vendor/libghostty-vt/src/termio/Termio.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/termio/Termio.zig | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/libghostty-vt/src/termio/Termio.zig b/vendor/libghostty-vt/src/termio/Termio.zig index 1d1bfe25..1b08c5e9 100644 --- a/vendor/libghostty-vt/src/termio/Termio.zig +++ b/vendor/libghostty-vt/src/termio/Termio.zig @@ -712,11 +712,15 @@ pub fn colorSchemeReportLocked(self: *Termio, td: *ThreadData, force: bool) !voi if (!force and !self.renderer_state.terminal.modes.get(.report_color_scheme)) { return; } - const output = switch (self.config.conditional_state.theme) { - .light => "\x1B[?997;2n", - .dark => "\x1B[?997;1n", + const scheme: terminalpkg.device_status.ColorScheme = switch (self.config.conditional_state.theme) { + .light => .light, + .dark => .dark, }; - try self.queueWrite(td, output, false); + + var buf: [terminalpkg.device_status.max_color_scheme_report_encode_size]u8 = undefined; + var writer: std.Io.Writer = .fixed(&buf); + try terminalpkg.device_status.encodeColorSchemeReport(&writer, scheme); + try self.queueWrite(td, writer.buffered(), false); } /// ThreadData is the data created and stored in the termio thread |
