termio/exec: initial subprocess screen size should be sub padding

This commit is contained in:
Mitchell Hashimoto
2023-08-24 08:45:32 -07:00
parent c962bd0abf
commit f2f2b1eaf1
4 changed files with 16 additions and 7 deletions

View File

@@ -222,14 +222,14 @@ fn display(
// We can do better by doing this with pure internal screen state
// but this handles scroll regions.
const height = rect.bottom_right.y - rect.top_left.y + 1;
const height = rect.bottom_right.y - rect.top_left.y;
for (0..height) |_| terminal.index() catch |err| {
log.warn("failed to move cursor: {}", .{err});
break;
};
terminal.setCursorPos(
terminal.screen.cursor.y + 1,
terminal.screen.cursor.y,
rect.bottom_right.x + 1,
);
},