From a493bf40b0026cc9c47e372577a49eebda8d264f Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Fri, 26 Jan 2024 10:40:27 +0900 Subject: [PATCH] Update text_cursor_state.rs --- crates/egui/src/text_selection/text_cursor_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/text_selection/text_cursor_state.rs b/crates/egui/src/text_selection/text_cursor_state.rs index c4423a4aef6..ed51fde3153 100644 --- a/crates/egui/src/text_selection/text_cursor_state.rs +++ b/crates/egui/src/text_selection/text_cursor_state.rs @@ -312,7 +312,7 @@ pub fn create_char_line_indexes(text: &str) -> Vec { let mut line_indexes = vec![0]; let mut count = 0; - for (_i, c) in text.chars().enumerate() { + for c in text.chars() { count += 1; if c == '\n' { line_indexes.push(count);