From ea0c55b303bd01c5ed6787254cffa3893e3773ac Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 23 Feb 2026 15:07:04 +0100 Subject: [PATCH] text: Swap `anchor_range_between` and `anchor_range_around` (#49888) These functions had their names swapped accidentally Follow up to https://github.com/zed-industries/zed/pull/49618 Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/text/src/text.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/text/src/text.rs b/crates/text/src/text.rs index 38ebc2148722d625718d38062fd61c043db62aed..b3a51e68ca21fcb93cb3f24ed8f3350de6de2208 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(&self, position: Range) -> Range { + pub fn anchor_range_between(&self, position: Range) -> Range { 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(&self, position: Range) -> Range { + pub fn anchor_range_around(&self, position: Range) -> Range { self.anchor_before(position.start)..self.anchor_after(position.end) }