From c8c605d23aacf1c896d4a1cc491e026133c9035c Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Tue, 23 Jan 2024 12:28:50 +0100 Subject: [PATCH] Fix horizontal scroll going too far to the left Previously one could scroll infinitely to the left. This clams it to 0. Co-authored-by: Antonio --- crates/editor/src/scroll.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/scroll.rs b/crates/editor/src/scroll.rs index 3f68b7d2d9..d7f1456bd6 100644 --- a/crates/editor/src/scroll.rs +++ b/crates/editor/src/scroll.rs @@ -202,7 +202,7 @@ impl ScrollManager { ScrollAnchor { anchor: top_anchor, offset: point( - scroll_position.x, + scroll_position.x.max(0.), scroll_position.y - top_anchor.to_display_point(&map).row() as f32, ), },