on master help sign in
This char_index is unused
01b1a62Blaž Hrastnik
helix-term/src/ui/editor.rs−4
@@ -250,8 +250,6 @@ impl EditorView {
250 // and paint the new cursor.
250 // and paint the new cursor.
251 // We could keep a single resizable surface on the View for that.
251 // We could keep a single resizable surface on the View for that.
252
252
253− let mut char_index = start;
254−
255 // iterate over range char by char
253 // iterate over range char by char
256 for grapheme in RopeGraphemes::new(text) {
254 for grapheme in RopeGraphemes::new(text) {
257 let out_of_bounds = visual_x < view.first_col as u16
255 let out_of_bounds = visual_x < view.first_col as u16
@@ -311,8 +309,6 @@ impl EditorView {
311
309
312 visual_x += width;
310 visual_x += width;
313 }
311 }
314−
315− char_index += grapheme.chars().count();
316 }
312 }
317 }
313 }
318 }
314 }