From bad77af2b31e6d6b09684bbec535f3b185dec6fa Mon Sep 17 00:00:00 2001 From: filipriec Date: Wed, 19 Feb 2025 22:27:06 +0100 Subject: [PATCH] working better command_line --- src/client/ui/handlers/event.rs | 5 +++++ 1 file changed, 5 insertions(+) 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())); } }