Skip to content

Commit

Permalink
Fix text selection of only whitespace (emilk#5123)
Browse files Browse the repository at this point in the history
* Closes emilk#5078
* Closes emilk#5120
  • Loading branch information
emilk authored and hacknus committed Oct 30, 2024
1 parent 9697eb9 commit dbd30bf
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 dbd30bf

Please sign in to comment.