File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -86,31 +86,31 @@ impl LineIndex {
86
86
let mut newlines = Vec :: with_capacity ( 16 ) ;
87
87
newlines. push ( TextSize :: from ( 0 ) ) ;
88
88
89
- let mut curr_row = 0 . into ( ) ;
90
- let mut curr_col = 0 . into ( ) ;
89
+ let mut cur_row = 0 . into ( ) ;
90
+ let mut cur_col = 0 . into ( ) ;
91
91
let mut line = 0 ;
92
92
for c in text. chars ( ) {
93
93
let c_len = TextSize :: of ( c) ;
94
- curr_row += c_len;
94
+ cur_row += c_len;
95
95
if c == '\n' {
96
- newlines. push ( curr_row ) ;
96
+ newlines. push ( cur_row ) ;
97
97
98
98
// Save any utf-16 characters seen in the previous line
99
99
if !wide_chars. is_empty ( ) {
100
100
line_wide_chars. insert ( line, std:: mem:: take ( & mut wide_chars) ) ;
101
101
}
102
102
103
103
// Prepare for processing the next line
104
- curr_col = 0 . into ( ) ;
104
+ cur_col = 0 . into ( ) ;
105
105
line += 1 ;
106
106
continue ;
107
107
}
108
108
109
109
if !c. is_ascii ( ) {
110
- wide_chars. push ( WideChar { start : curr_col , end : curr_col + c_len } ) ;
110
+ wide_chars. push ( WideChar { start : cur_col , end : cur_col + c_len } ) ;
111
111
}
112
112
113
- curr_col += c_len;
113
+ cur_col += c_len;
114
114
}
115
115
116
116
// Save any utf-16 characters seen in the last line
You can’t perform that action at this time.
0 commit comments