more clearly communicate intent for scroll_bottom

This commit is contained in:
Emil Lerch 2026-03-19 12:08:39 -07:00
parent ff87505771
commit 4a3df7a05b
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -627,7 +627,7 @@ pub const App = struct {
return ctx.consumeAndRedraw();
},
.scroll_bottom => {
self.scroll_offset = 999;
self.scroll_offset = std.math.maxInt(usize) / 2; // clamped during draw...divide by 2 to avoid overflow if arithmetic is done
if (self.active_tab == .portfolio and self.portfolio_rows.items.len > 0)
self.cursor = self.portfolio_rows.items.len - 1;
if (self.active_tab == .options and self.options_rows.items.len > 0)