terminal: all DCS events can produce a command

This commit is contained in:
Mitchell Hashimoto
2024-07-11 18:53:42 -07:00
parent 01e1538ad3
commit f375bf009c
2 changed files with 40 additions and 27 deletions

View File

@@ -1860,7 +1860,9 @@ 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 {