diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 5f282dd86..625b4f50b 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -114,7 +114,7 @@ pub fn append(self: *Terminal, alloc: Allocator, str: []const u8) !void { /// /// This may allocate if necessary to store the character in the grid. pub fn appendChar(self: *Terminal, alloc: Allocator, c: u8) !void { - log.debug("char: {}", .{c}); + //log.debug("char: {}", .{c}); const actions = self.parser.next(c); for (actions) |action_opt| { switch (action_opt orelse continue) { @@ -133,6 +133,11 @@ fn print(self: *Terminal, alloc: Allocator, c: u8) !void { // Move the cursor self.cursor.x += 1; + + // TODO: wrap + if (self.cursor.x == self.cols) { + self.cursor.x -= 1; + } } fn execute(self: *Terminal, alloc: Allocator, c: u8) !void {