Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'lib/line-index/src/lib.rs')
-rw-r--r--lib/line-index/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
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
+ }
}