diff --git a/src/client/ui/handlers/event.rs b/src/client/ui/handlers/event.rs index b2937d5..fc29176 100644 --- a/src/client/ui/handlers/event.rs +++ b/src/client/ui/handlers/event.rs @@ -248,12 +248,17 @@ impl EventHandler { *is_saved = true; form_state.has_unsaved_changes = false; + self.command_input.clear(); // Clear the command input + self.command_mode = false; // Reset command mode + self.command_message.clear(); // Clear the command message return Ok((false, message)); } else { let (should_exit, message) = app_terminal .handle_command(action, is_saved, &form_data) .await?; self.command_message = message; + self.command_input.clear(); // Clear the command input + self.command_mode = false; // Reset command mode return Ok((should_exit, self.command_message.clone())); } }