SIGN IN SIGN UP
bevyengine / bevy UNCLAIMED

A refreshingly simple data-driven game engine built in Rust

0 0 59 Rust

Selection rect gap fix (#24306)

# Objective

Fix the gaps that sometimes occur between vertically adjacent text
selection rects:

<img width="486" height="448" alt="gap"
src="https://github.com/user-attachments/assets/b8e8d6b3-18fa-4731-9937-72544f1837be"
/>

Frequency of gaps varies depending on scale factor and font settings.

## Solution

Iterate the selection rects returned from Parley in pairs. If there is a
gap, close it by extending the bottom edge downwards.

<img width="489" height="460" alt="no-gaps"
src="https://github.com/user-attachments/assets/063b3b93-c6af-459b-a774-a345a22b95b7"
/>

## Testing
```
cargo run --example multiline_text_input --features="system_clipboard"
```
I
ickshonpe committed
6603a29cfd49a2249c559b480fe9c8d15aab5240
Parent: bf9a118
Committed by GitHub <noreply@github.com> on 5/21/2026, 8:28:44 AM