File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ pub struct LineIndex {
87
87
newlines : Box < [ TextSize ] > ,
88
88
/// List of non-ASCII characters on each line.
89
89
line_wide_chars : IntMap < u32 , Box < [ WideChar ] > > ,
90
- /// The size of the entire text.
91
- size : TextSize ,
90
+ /// The length of the entire text.
91
+ len : TextSize ,
92
92
}
93
93
94
94
impl LineIndex {
@@ -135,7 +135,7 @@ impl LineIndex {
135
135
LineIndex {
136
136
newlines : newlines. into_boxed_slice ( ) ,
137
137
line_wide_chars,
138
- size : TextSize :: of ( text) ,
138
+ len : TextSize :: of ( text) ,
139
139
}
140
140
}
141
141
@@ -153,7 +153,7 @@ impl LineIndex {
153
153
/// Returns `None` if the `offset` was invalid, e.g. if it extends past the end of the text or
154
154
/// points to the middle of a multi-byte character.
155
155
pub fn try_line_col ( & self , offset : TextSize ) -> Option < LineCol > {
156
- if offset > self . size {
156
+ if offset > self . len {
157
157
return None ;
158
158
}
159
159
let line = self . newlines . partition_point ( |& it| it <= offset) ;
You can’t perform that action at this time.
0 commit comments