From 2cbc2833d10046333b698d1caa601bc7ef85de98 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Tue, 26 Nov 2024 08:59:51 -0600 Subject: [PATCH] termio: fixes to kitty color reporting The kitty color report response is an OSC, not a CSI, so change `[` to `]`. Colors which are unset should be reported with `{key}=`. --- src/termio/stream_handler.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/termio/stream_handler.zig b/src/termio/stream_handler.zig index 2fc9e92af..64915f704 100644 --- a/src/termio/stream_handler.zig +++ b/src/termio/stream_handler.zig @@ -1418,7 +1418,7 @@ pub const StreamHandler = struct { var buf = std.ArrayList(u8).init(self.alloc); defer buf.deinit(); const writer = buf.writer(); - try writer.writeAll("\x1b[21"); + try writer.writeAll("\x1b]21"); for (request.list.items) |item| { switch (item) { @@ -1435,7 +1435,7 @@ pub const StreamHandler = struct { }, }, } orelse { - log.warn("no color configured for {}", .{key}); + try writer.print(";{}=", .{key}); continue; };