Fix text selection of only whitespace (#5123)

* Closes https://github.com/emilk/egui/issues/5078
* Closes https://github.com/emilk/egui/pull/5120
This commit is contained in:
Emil Ernerfeldt 2024-09-18 11:14:21 +02:00 committed by GitHub
parent ce3911bc0d
commit 24205f572a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -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,