Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Correctly clamp scroll offset vertically
Antonio Scandurra176a022b10ac
diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rsindex e6fc58e872d..90af9e130e7 100644--- a/crates/gpui2/src/elements/div.rs+++ b/crates/gpui2/src/elements/div.rs@@ -1472,7 +1472,7 @@ impl Interactivity {{let mut scroll_offset = scroll_offset.borrow_mut();scroll_offset.x = scroll_offset.x.clamp(-scroll_max.width, px(0.));- scroll_offset.y = scroll_offset.x.clamp(-scroll_max.height, px(0.));+ scroll_offset.y = scroll_offset.y.clamp(-scroll_max.height, px(0.));}let interactive_bounds = interactive_bounds.clone();