diff --git a/src/ui/app.rs b/src/ui/app.rs index 6fdd10a..e30fd17 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -358,9 +358,6 @@ impl App { buffer.clone() } else { return Ok(()); }; self.execute_command(&buf)?; - if !matches!(self.mode, AppMode::Quit | AppMode::ImportWizard) { - self.mode = AppMode::Normal; - } } KeyCode::Char(c) => { if let AppMode::CommandMode { buffer } = &mut self.mode { @@ -387,6 +384,9 @@ impl App { .map(|(c, r)| (c, r.trim())) .unwrap_or((raw, "")); + // Default: return to Normal. Commands that open a new mode override this. + self.mode = AppMode::Normal; + match cmd_name { "q" | "quit" => { if self.dirty {