diff --git a/crates/egui/src/text_selection/visuals.rs b/crates/egui/src/text_selection/visuals.rs index e41d7a436..e114ddb55 100644 --- a/crates/egui/src/text_selection/visuals.rs +++ b/crates/egui/src/text_selection/visuals.rs @@ -61,7 +61,7 @@ pub fn paint_text_selection( let last_glyph_index = if ri == max.row { max.column } else { - row.glyphs.len() - 1 + row.glyphs.len() }; let first_vertex_index = row diff --git a/crates/egui_demo_lib/tests/snapshots/text_selection_0.png b/crates/egui_demo_lib/tests/snapshots/text_selection_0.png index a6d590fdf..a7aac34bf 100644 --- a/crates/egui_demo_lib/tests/snapshots/text_selection_0.png +++ b/crates/egui_demo_lib/tests/snapshots/text_selection_0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16e993bb27d32162fcf573cc4d977af775e6e0b94373fc5e8e1a9890453e508c -size 5278 +oid sha256:ce1e16fa09588ec5351d031408657137f42ff40eb7cf6dd00b8c65a4f51ec680 +size 5332