From 3040cfece10e98924d705acb6fe40ba1b1520986 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 27 Dec 2021 15:42:37 -0800 Subject: [PATCH] Fix Editor::newest_selection Co-Authored-By: Nathan Sobo --- crates/editor/src/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()