From 8caa67d5b348760c158104860e1dbf458d51b93c Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Sun, 21 Jan 2024 13:16:52 -0600 Subject: [PATCH] tty: add todo for incomplete parsing Signed-off-by: Tim Culverhouse --- src/Tty.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tty.zig b/src/Tty.zig index e32de6d..c2fa624 100644 --- a/src/Tty.zig +++ b/src/Tty.zig @@ -133,7 +133,9 @@ pub fn run( while (start < n) { const result = try parser.parse(buf[start..n]); start = result.n; - log.debug("something {}", .{result}); + // TODO: if we get 0 byte read, copy the remaining bytes to the + // beginning of the buffer and read mmore? + const event = result.event orelse continue; switch (event) { .key_press => |key| {