From 60056b884536c77df8b82834d253b2bc784c02e4 Mon Sep 17 00:00:00 2001 From: Ariel Davis Date: Sat, 6 May 2023 15:44:37 -0700 Subject: [PATCH] Expose len --- lib/line-index/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs index aac5b15649..ad67d3f246 100644 --- a/lib/line-index/src/lib.rs +++ b/lib/line-index/src/lib.rs @@ -229,4 +229,9 @@ impl LineIndex { .map(|(lo, hi)| TextRange::new(lo, hi)) .filter(|it| !it.is_empty()) } + + /// Returns the length of the original text. + pub fn len(&self) -> TextSize { + self.len + } }