File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ pub struct LineIndex {
8787 newlines : Box < [ TextSize ] > ,
8888 /// List of non-ASCII characters on each line.
8989 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 ,
9292}
9393
9494impl LineIndex {
@@ -135,7 +135,7 @@ impl LineIndex {
135135 LineIndex {
136136 newlines : newlines. into_boxed_slice ( ) ,
137137 line_wide_chars,
138- size : TextSize :: of ( text) ,
138+ len : TextSize :: of ( text) ,
139139 }
140140 }
141141
@@ -153,7 +153,7 @@ impl LineIndex {
153153 /// Returns `None` if the `offset` was invalid, e.g. if it extends past the end of the text or
154154 /// points to the middle of a multi-byte character.
155155 pub fn try_line_col ( & self , offset : TextSize ) -> Option < LineCol > {
156- if offset > self . size {
156+ if offset > self . len {
157157 return None ;
158158 }
159159 let line = self . newlines . partition_point ( |& it| it <= offset) ;
You can’t perform that action at this time.
0 commit comments