Skip to content

Commit

Permalink
Fix text selection of only whitespace (#5123)
Browse files Browse the repository at this point in the history
* Closes #5078
* Closes #5120
  • Loading branch information
emilk authored Sep 18, 2024
1 parent ce3911b commit 24205f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/egui/src/text_selection/visuals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ pub fn paint_text_selection(
mesh.indices[glyph_index_start..glyph_index_start + 6]
.clone_from_slice(&selection_triangles);

row.visuals.mesh_bounds = mesh.calc_bounds();

if let Some(new_vertex_indices) = &mut new_vertex_indices {
new_vertex_indices.push(RowVertexIndices {
row: ri,
Expand Down

0 comments on commit 24205f5

Please sign in to comment.