mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
termio: fix up rebase
This commit is contained in:
@ -173,19 +173,31 @@ pub const StreamHandler = struct {
|
||||
}
|
||||
|
||||
pub fn dcsHook(self: *StreamHandler, dcs: terminal.DCS) !void {
|
||||
self.dcs.hook(self.alloc, dcs);
|
||||
var cmd = self.dcs.hook(self.alloc, dcs) orelse return;
|
||||
defer cmd.deinit();
|
||||
try self.dcsCommand(&cmd);
|
||||
}
|
||||
|
||||
pub fn dcsPut(self: *StreamHandler, byte: u8) !void {
|
||||
self.dcs.put(byte);
|
||||
var cmd = self.dcs.put(byte) orelse return;
|
||||
defer cmd.deinit();
|
||||
try self.dcsCommand(&cmd);
|
||||
}
|
||||
|
||||
pub fn dcsUnhook(self: *StreamHandler) !void {
|
||||
var cmd = self.dcs.unhook() orelse return;
|
||||
defer cmd.deinit();
|
||||
try self.dcsCommand(&cmd);
|
||||
}
|
||||
|
||||
fn dcsCommand(self: *StreamHandler, cmd: *terminal.dcs.Command) !void {
|
||||
// log.warn("DCS command: {}", .{cmd});
|
||||
switch (cmd) {
|
||||
switch (cmd.*) {
|
||||
.tmux => |tmux| {
|
||||
// TODO: process it
|
||||
log.warn("tmux control mode event unimplemented cmd={}", .{tmux});
|
||||
},
|
||||
|
||||
.xtgettcap => |*gettcap| {
|
||||
const map = comptime terminfo.ghostty.xtgettcapMap();
|
||||
while (gettcap.next()) |key| {
|
||||
@ -193,6 +205,7 @@ pub const StreamHandler = struct {
|
||||
self.messageWriter(.{ .write_stable = response });
|
||||
}
|
||||
},
|
||||
|
||||
.decrqss => |decrqss| {
|
||||
var response: [128]u8 = undefined;
|
||||
var stream = std.io.fixedBufferStream(&response);
|
||||
|
Reference in New Issue
Block a user