diff options
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 |
