From f9d2fc7532d061416160701d91b913fb53f00c25 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 7 Jun 2024 12:51:45 -0500 Subject: [PATCH] widgets(terminal): append last byte to escape seqs --- src/widgets/terminal/Parser.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/terminal/Parser.zig b/src/widgets/terminal/Parser.zig index ee645c0..bd25231 100644 --- a/src/widgets/terminal/Parser.zig +++ b/src/widgets/terminal/Parser.zig @@ -81,7 +81,10 @@ inline fn parseEscape(self: *Parser, reader: Reader) !Event { const b = try reader.readByte(); switch (b) { 0x20...0x2F => continue, - else => return .{ .escape = self.buf.items }, + else => { + try self.buf.append(b); + return .{ .escape = self.buf.items }; + }, } } }