diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 4fb1f1c7415aa41e1caf4075db0688d3fc61f0d3..bf2b25c0a309f6e2cafe84b5aeb2c661b344a6fe 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()