Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Checkpoint
Nathan Sobofc927f740664
diff --git a/crates/gpui2/src/geometry.rs b/crates/gpui2/src/geometry.rsindex 923bb0bf9f6..b472d77f574 100644--- a/crates/gpui2/src/geometry.rs+++ b/crates/gpui2/src/geometry.rs@@ -8,7 +8,7 @@ use std::{};#[derive(- Refineable, Default, Add, AddAssign, Sub, SubAssign, Copy, Debug, PartialEq, Eq, Hash, Neg,+ Refineable, Default, Add, AddAssign, Sub, SubAssign, Copy, Debug, PartialEq, Eq, Hash,)]#[refineable(debug)]#[repr(C)]diff --git a/crates/gpui2/src/interactive.rs b/crates/gpui2/src/interactive.rsindex aeaa5b959af..194e6824ef9 100644--- a/crates/gpui2/src/interactive.rs+++ b/crates/gpui2/src/interactive.rs@@ -548,12 +548,12 @@ pub trait ElementInteraction<V: 'static + Send + Sync>: 'static + Send + Sync {if overflow.x == Overflow::Scroll {scroll_offset.x =- (scroll_offset.x - delta.x).clamp(px(0.), scroll_max.width);+ (scroll_offset.x + delta.x).clamp(-scroll_max.width, px(0.));}if overflow.y == Overflow::Scroll {scroll_offset.y =- (scroll_offset.y - delta.y).clamp(px(0.), scroll_max.height);+ (scroll_offset.y + delta.y).clamp(-scroll_max.height, px(0.));}if *scroll_offset != old_scroll_offset {diff --git a/crates/gpui2/src/window.rs b/crates/gpui2/src/window.rsindex 0211c8d9a17..33b6daeb224 100644--- a/crates/gpui2/src/window.rs+++ b/crates/gpui2/src/window.rs@@ -469,7 +469,7 @@ impl<'a, 'w> WindowContext<'a, 'w> {.layout_engine.layout_bounds(layout_id).map(Into::into);- bounds.origin -= self.element_offset();+ bounds.origin += self.element_offset();bounds}@@ -812,7 +812,7 @@ impl<'a, 'w> WindowContext<'a, 'w> {if let Some(mut active_drag) = cx.active_drag.take() {cx.stack(1, |cx| {- let mouse_position = -cx.mouse_position();+ let mouse_position = cx.mouse_position();cx.with_element_offset(Some(mouse_position), |cx| {let available_space =size(AvailableSpace::MinContent, AvailableSpace::MinContent);