diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 4fb1f1c741..bf2b25c0a3 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -3207,7 +3207,7 @@ impl Editor { .or_else(|| { self.selections .iter() - .min_by_key(|s| s.id) + .max_by_key(|s| s.id) .map(|selection| self.resolve_selection(selection, snapshot)) }) .unwrap()