Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
text: Swap `anchor_range_between` and `anchor_range_around` (#49888)
Lukas Wirthea0c55b303bd
diff --git a/crates/text/src/text.rs b/crates/text/src/text.rsindex 38ebc214872..b3a51e68ca2 100644--- a/crates/text/src/text.rs+++ b/crates/text/src/text.rs@@ -2404,12 +2404,12 @@ impl BufferSnapshot {}/// Returns an anchor range for the given input position range that is anchored to the text inbetween.- pub fn anchor_range_around<T: ToOffset>(&self, position: Range<T>) -> Range<Anchor> {+ pub fn anchor_range_between<T: ToOffset>(&self, position: Range<T>) -> Range<Anchor> {self.anchor_before(position.start)..self.anchor_after(position.end)}/// Returns an anchor range for the given input position range that is anchored to the text before the start position and after the end position.- pub fn anchor_range_between<T: ToOffset>(&self, position: Range<T>) -> Range<Anchor> {+ pub fn anchor_range_around<T: ToOffset>(&self, position: Range<T>) -> Range<Anchor> {self.anchor_before(position.start)..self.anchor_after(position.end)}