Skip to content

Commit

Permalink
Update text_cursor_state.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jan 26, 2024
1 parent a367c89 commit f7ccce4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui/src/text_selection/text_cursor_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub fn create_char_line_indexes(text: &str) -> Vec<usize> {
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);
Expand Down

0 comments on commit f7ccce4

Please sign in to comment.