From 2d9ceb8137b96a434908bfd0b51f131eb3ef7243 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 31 Oct 2026 02:51:09 -0700 Subject: [PATCH] Shortcuts: rewrap the typing_presses doc comment --- crates/ui-egui/src/shortcuts.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/shortcuts.rs b/crates/ui-egui/src/shortcuts.rs index 435758b85..504e84b2d 100644 --- a/crates/ui-egui/src/shortcuts.rs +++ b/crates/ui-egui/src/shortcuts.rs @@ -849,10 +849,9 @@ fn latin(text: &str, physical: Option) -> String { /// For each event, the index of the key press that typed it when it is text: the press right /// before it (egui-winit) unless an earlier text took that press, or else the press right after it /// (eframe's web build with no text field focused). Modifier key presses type no text. Each press -/// types at most one text. A text -/// takes the press after it only when every later text in the same run of alternating texts and -/// presses has a press after it too; otherwise the text after that press takes it as the press -/// before it, and this text has none. +/// types at most one text. A text takes the press after it only when every later text in the same +/// run of alternating texts and presses has a press after it too; otherwise the text after that +/// press takes it as the press before it, and this text has none. fn typing_presses(events: &[egui::Event]) -> Vec> { let is_press = |k: usize| matches!(events.get(k), Some(egui::Event::Key { key, pressed: true, .. }) if !is_modifier(*key)); let is_text = |k: usize| matches!(events.get(k), Some(egui::Event::Text(_)));