erase display complete should scroll to bottom

This commit is contained in:
Mitchell Hashimoto
2022-08-17 17:24:09 -07:00
parent 16f981a48a
commit b562eec83c

View File

@ -1049,6 +1049,12 @@ pub fn setCursorPos(self: *Window, row: u16, col: u16) !void {
} }
pub fn eraseDisplay(self: *Window, mode: terminal.EraseDisplay) !void { pub fn eraseDisplay(self: *Window, mode: terminal.EraseDisplay) !void {
if (mode == .complete) {
// Whenever we erase the full display, scroll to bottom.
self.terminal.scrollViewport(.{ .bottom = {} });
try self.render_timer.schedule();
}
self.terminal.eraseDisplay(mode); self.terminal.eraseDisplay(mode);
} }