From 0782248cffb7f7eab850d002497c588358ea4cce Mon Sep 17 00:00:00 2001 From: jordanlemcc-ship-it Date: Wed, 21 Oct 2026 10:05:56 +0700 Subject: [PATCH] ui-egui: surface erase errors in the batched type_text path Address CodeRabbit review on #3307: the new `Seq::Erase` arm discarded the `tool_key` Result, dropping an erase error silently, whereas the old `route_type_input`/`text_key` path reported it via `app.status`. Mirror that behaviour so a failed Backspace/Delete still surfaces in the status bar. Behaviour otherwise unchanged; fmt/clippy clean and the three IME tests pass. Co-Authored-By: Claude Opus 4.8 --- crates/ui-egui/src/shortcuts.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/shortcuts.rs b/crates/ui-egui/src/shortcuts.rs index b26e4dc0e..76e079932 100644 --- a/crates/ui-egui/src/shortcuts.rs +++ b/crates/ui-egui/src/shortcuts.rs @@ -272,7 +272,14 @@ fn type_text(app: &mut VectorcraftApp, ctx: &egui::Context) { app.session.tool_text(&t, view) } // While composing (or in a frame that began composing), editing keys belong to the IME. - Seq::Erase(tk, m) if !was_composing && !app.session.tool_composing() => app.session.tool_key(tk, m, view), + Seq::Erase(tk, m) if !was_composing && !app.session.tool_composing() => { + // Mirror `route_type_input`/`text_key`: surface an erase error in the status bar + // instead of discarding it. + if let Err(e) = app.session.tool_key(tk, m, view) { + app.status(e.to_string()); + } + Ok(vec![]) + } Seq::Erase(..) => Ok(vec![]), }; }