aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src')
-rw-r--r--crates/ra_editor/src/line_index.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_editor/src/line_index.rs b/crates/ra_editor/src/line_index.rs
index aab7e4081..7eddfd502 100644
--- a/crates/ra_editor/src/line_index.rs
+++ b/crates/ra_editor/src/line_index.rs
@@ -1,4 +1,4 @@
1use crate::TextUnit; 1use crate::{TextUnit, TextRange};
2use rustc_hash::FxHashMap; 2use rustc_hash::FxHashMap;
3use superslice::Ext; 3use superslice::Ext;
4 4
@@ -120,6 +120,10 @@ impl LineIndex {
120 120
121 col 121 col
122 } 122 }
123
124 pub fn newlines(&self) -> &[TextUnit] {
125 &self.newlines[1..]
126 }
123} 127}
124 128
125#[test] 129#[test]