scroll down with no scrollback fixes

This commit is contained in:
Mitchell Hashimoto
2022-07-11 06:53:21 -07:00
parent f602d09d5d
commit 07d5e3c588
2 changed files with 35 additions and 3 deletions

View File

@@ -513,7 +513,7 @@ fn scrollCallback(window: glfw.Window, xoff: f64, yoff: f64) void {
_ = xoff;
// Positive is up
const sign: isize = if (yoff < 0) -1 else 1;
const sign: isize = if (yoff > 0) -1 else 1;
const delta: isize = sign * @maximum(@divFloor(win.grid.size.rows, 15), 1);
log.info("scroll: delta={}", .{delta});
win.terminal.scrollViewport(.{ .delta = delta });