working better command_line
This commit is contained in:
@@ -248,12 +248,17 @@ impl EventHandler {
|
|||||||
|
|
||||||
*is_saved = true;
|
*is_saved = true;
|
||||||
form_state.has_unsaved_changes = false;
|
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));
|
return Ok((false, message));
|
||||||
} else {
|
} else {
|
||||||
let (should_exit, message) = app_terminal
|
let (should_exit, message) = app_terminal
|
||||||
.handle_command(action, is_saved, &form_data)
|
.handle_command(action, is_saved, &form_data)
|
||||||
.await?;
|
.await?;
|
||||||
self.command_message = message;
|
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()));
|
return Ok((should_exit, self.command_message.clone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user