widgets(nvim): fix scroll down

This commit is contained in:
Tim Culverhouse 2024-05-03 12:30:04 -05:00
parent cbfa56bb1b
commit 0fe1142989

View file

@ -568,8 +568,7 @@ pub fn Nvim(comptime T: type) type {
if (row + rows > bot) break; if (row + rows > bot) break;
var col: usize = left; var col: usize = left;
while (col < right) : (col += 1) { while (col < right) : (col += 1) {
if (row + rows < self.screen.height) return; const cell = self.screen.readCell(col, row + rows) orelse return;
const cell = self.screen.readCell(col, row + rows) orelse unreachable;
self.screen.writeCell(col, row, cell); self.screen.writeCell(col, row, cell);
} }
} }