Fix Editor::newest_selection

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-12-27 15:42:37 -08:00
parent f5d4e26799
commit 3040cfece1

View File

@ -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()