Format the reworked select_all_on_focus.

This commit is contained in:
Vikram Bhaskaran
2026-10-16 01:36:23 +07:00
committed by bflatastic
parent 173c88d2a1
commit 0c11ff656c
+3 -1
View File
@@ -338,7 +338,9 @@ fn select_all_on_focus(ui: &Ui, resp: &Response, text: &str) {
// click, and a release inside one character leaves no text selection, so select-all on
// release would replace the drag the user just made (#1326).
let dragged = clicked_focus
&& ui.data_mut(|d| d.remove_temp::<egui::Pos2>(press_pos)).is_some_and(|p0| ui.input(|i| i.pointer.interact_pos()).is_some_and(|p1| (p1 - p0).length() > 3.0));
&& ui
.data_mut(|d| d.remove_temp::<egui::Pos2>(press_pos))
.is_some_and(|p0| ui.input(|i| i.pointer.interact_pos()).is_some_and(|p1| (p1 - p0).length() > 3.0));
if resp.lost_focus() {
ui.data_mut(|d| {
d.remove_temp::<bool>(pending);