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

Reverts zed-industries/zed#31399

I found that in some cases, Zed will panic when using `editor: open
selections in multibuffer` if the selection is reversed. It doesn't
happen in most cases that I've tested, but in some strange edge cases
(that I dont fully understand ATM), it does. I'm reverting for now, as
the previous behavior is better than a panic, but will re-implement this
fix to preserving selection directions in a new PR with comprehensive
testing

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-06-10 15:31:38 -04:00 committed by GitHub
parent f567bb52ff
commit 5270844b42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {
.map(|range| Location {
buffer: buffer.clone(),
range,
}
range: range.start.text_anchor..range.end.text_anchor,
})
.collect::<Vec<_>>();