diff options
Diffstat (limited to 'vendor/libghostty-vt/src/termio/stream_handler.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/termio/stream_handler.zig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/termio/stream_handler.zig b/vendor/libghostty-vt/src/termio/stream_handler.zig index fb3a6b3f..43c5d611 100644 --- a/vendor/libghostty-vt/src/termio/stream_handler.zig +++ b/vendor/libghostty-vt/src/termio/stream_handler.zig @@ -205,6 +205,10 @@ pub const StreamHandler = struct { @branchHint(.likely); try self.terminal.print(value.cp); }, + .print_slice => { + @branchHint(.likely); + try self.terminal.printSlice(value.cps); + }, .print_repeat => try self.terminal.printRepeat(value), .bell => self.bell(), .backspace => self.terminal.backspace(), @@ -357,6 +361,7 @@ pub const StreamHandler = struct { .apc_start => self.apc.start(), .apc_end => try self.apcEnd(), .apc_put => self.apc.feed(self.alloc, value), + .apc_put_slice => self.apc.feedSlice(self.alloc, value.bytes), // Unimplemented .title_push, @@ -559,6 +564,23 @@ pub const StreamHandler = struct { } } }, + + .glyph => |*glyph_req| { + const resp = self.terminal.glyphProtocol(self.alloc, glyph_req); + switch (glyph_req.*) { + .register, .clear => try self.queueRender(), + .support, .query => {}, + } + + if (resp) |r| { + var buf: [terminal.apc.glyph.Response.max_wire_bytes]u8 = undefined; + var writer: std.Io.Writer = .fixed(&buf); + try r.formatWire(&writer); + const final = writer.buffered(); + log.debug("glyph protocol response: {x}", .{final}); + self.messageWriter(try termio.Message.writeReq(self.alloc, final)); + } + }, } } |
