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

@ -2164,7 +2164,13 @@ pub const RowIterator = struct {
self.chunk = self.page_it.next(); self.chunk = self.page_it.next();
if (self.chunk) |c| self.offset = c.end - 1; if (self.chunk) |c| self.offset = c.end - 1;
} else { } else {
self.offset -= 1; // 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;
}
} }
}, },
} }