Merge branch 'master' into zig-0.15

This commit is contained in:
CJ van den Berg 2025-08-27 00:04:58 +02:00
commit 15990b9dce
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 39 additions and 6 deletions

View file

@ -67,8 +67,9 @@ inline fn is_at_bottom(self: *const Self, root: Buffer.Root) bool {
}
pub inline fn is_visible(self: *const Self, cursor: *const Cursor) bool {
if (self.rows == 0) return false;
const row_min = self.row;
const row_max = row_min + self.rows;
const row_max = row_min + self.rows - 1;
const col_min = self.col;
const col_max = col_min + self.cols;
return row_min <= cursor.row and cursor.row <= row_max and