terminal: PageList rowIterator respects limit row

This commit is contained in:
Mitchell Hashimoto
2024-03-18 20:20:08 -07:00
parent 07a27072dc
commit 3f0607d6c0

View File

@ -2163,9 +2163,15 @@ pub const RowIterator = struct {
if (self.offset == 0) {
self.chunk = self.page_it.next();
if (self.chunk) |c| self.offset = c.end - 1;
} else {
// If we're at the start of the chunk and its a non-zero
// offset then we've reached a limit.
if (self.offset == chunk.start) {
self.chunk = null;
} else {
self.offset -= 1;
}
}
},
}