From 71511e1dc6b1cdb0d86730c3cbf25ca0b5448140 Mon Sep 17 00:00:00 2001 From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:17:06 +0000 Subject: [PATCH] text: Swap `anchor_range_between` and `anchor_range_around` (#49888) (cherry-pick to preview) (#49890) Cherry-pick of #49888 to preview ---- 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 ... Co-authored-by: Lukas Wirth --- 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 91767d99841b721d529de45229c1b067a563cf72..8ed80417ea38eadf5e7490ab225898084b2836b7 100644 --- a/crates/text/src/text.rs +++ b/crates/text/src/text.rs @@ -2402,12 +2402,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) }