Fix horizontal scroll going too far to the left (#4213)

Antonio Scandurra created

Previously one could scroll infinitely to the left. This clams it to 0.

Release Notes:

- Fixed horizontal scroll possibly going too far to the left.

Change summary

crates/editor/src/scroll.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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,
                     ),
                 },