Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Revert "Preserve selection direction when running `editor: open selections in multibuffer`" (#32483)

Joseph T. Lyons5270844b427f
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 0dd894beed7..2da1d34161f 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -18137,16 +18137,9 @@ impl Editor {
.selections
.disjoint_anchors()
.iter()
- .map(|selection| {
- let range = if selection.reversed {
- selection.end.text_anchor..selection.start.text_anchor
- } else {
- selection.start.text_anchor..selection.end.text_anchor
- };
- Location {
- buffer: buffer.clone(),
- range,
- }
+ .map(|range| Location {
+ buffer: buffer.clone(),
+ range: range.start.text_anchor..range.end.text_anchor,
})
.collect::<Vec<_>>();