From 3f48a43ba48ee904eda5d531463473fd5d0ee4c8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 25 Sep 2023 17:42:37 -0700 Subject: [PATCH] terminal: cursors must set pending wrap --- src/terminal/Terminal.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 8aa22cf5f..f45ffc77b 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -1356,9 +1356,9 @@ pub fn cursorLeft(self: *Terminal, count: usize) void { const tracy = trace(@src()); defer tracy.end(); - // TODO: scroll region, wrap - + // TODO: scroll region self.screen.cursor.x -|= if (count == 0) 1 else count; + self.screen.cursor.pending_wrap = false; } /// Move the cursor right amount columns. If amount is greater than the @@ -1385,6 +1385,7 @@ pub fn cursorDown(self: *Terminal, count: usize) void { const tracy = trace(@src()); defer tracy.end(); + self.screen.cursor.pending_wrap = false; self.screen.cursor.y += if (count == 0) 1 else count; if (self.screen.cursor.y >= self.rows) { self.screen.cursor.y = self.rows - 1;