fix: crash in View when panel is maximized

This commit is contained in:
CJ van den Berg 2026-02-26 20:29:36 +01:00
parent ec8379ce51
commit 05cba52397
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -109,8 +109,8 @@ fn clamp_row(self: *Self, cursor: *const Cursor, abs: bool, bottom_offset: usize
}
if (cursor.row < self.row) {
self.row = 0;
} else if (cursor.row > self.row + self.rows - bottom_min_border_distance) {
self.row = cursor.row + bottom_min_border_distance - self.rows;
} else if (cursor.row > self.row + self.rows -| bottom_min_border_distance) {
self.row = cursor.row + bottom_min_border_distance -| self.rows;
}
}