fix confirmation prompt closing via rmb

This commit is contained in:
nnyyxxxx 2024-11-13 04:00:37 -05:00
parent 563676db7c
commit e583fc7864
No known key found for this signature in database
GPG Key ID: 6038FFD6589902CB
3 changed files with 9 additions and 1 deletions

View File

@ -91,6 +91,10 @@ impl FloatContent for ConfirmPrompt {
self.status = ConfirmStatus::Confirm;
true
}
MouseEventKind::Down(MouseButton::Right) => {
self.status = ConfirmStatus::Abort;
false
}
MouseEventKind::ScrollDown => {
self.scroll_down();
false

View File

@ -56,7 +56,10 @@ impl<Content: FloatContent + ?Sized> Float<Content> {
pub fn handle_mouse_event(&mut self, event: &MouseEvent) -> bool {
match event.kind {
MouseEventKind::Down(MouseButton::Right) => true,
MouseEventKind::Down(MouseButton::Right) => {
self.content.handle_mouse_event(event);
true
}
_ => self.content.handle_mouse_event(event),
}
}

View File

@ -519,6 +519,7 @@ impl AppState {
ConfirmStatus::None => {}
}
}
return true;
}
_ => {}
}