diff --git a/crates/engine/src/tools/pointer.rs b/crates/engine/src/tools/pointer.rs index 6d88595d7..e289e5c70 100644 --- a/crates/engine/src/tools/pointer.rs +++ b/crates/engine/src/tools/pointer.rs @@ -552,7 +552,7 @@ impl Session { Some(Drag::Freeform { mode, points, .. }) => { if mode == "scribble" { // A scribble ending back at its start closes into a filled shape. - let closed = points.len() > 3 && points.first().is_some_and(|a| (*a - p).hypot() <= 6.0); + let closed = points.len() > 3 && points.first().zip(points.last()).is_some_and(|(a, b)| (*a - *b).hypot() <= 6.0); self.tool.drag = Some(Drag::Freeform { mode, points, pressed: false }); return self.finish_freeform(closed); }