Reset message bar when ! is passed with :cancel (#231)

This commit is contained in:
Ulyssa 2024-03-27 19:35:15 -07:00 committed by GitHub
parent 6600685dd5
commit 79f6b5b75c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -185,13 +185,15 @@ impl ChatState {
match act {
MessageAction::Cancel(skip_confirm) => {
self.reply_to = None;
self.editing = None;
if skip_confirm {
self.reset();
return Ok(None);
}
self.reply_to = None;
self.editing = None;
let msg = "Would you like to clear the message bar?";
let act = PromptAction::Abort(false);
let prompt = PromptYesNo::new(msg, vec![Action::from(act)]);