aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2022-11-02 14:52:31 +0100
committerJoris2022-11-02 14:52:31 +0100
commitf770efb58c84a78c3bcefc6e8f91b9001ec6d755 (patch)
tree7bb71f1b299e66d5682962fce439c6125e11c232
parent2123e99f29a2ea7ccb73a072ecd7276f1eab9655 (diff)
Allow to use Control-C to quit in message
-rw-r--r--src/gui/message.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/message.rs b/src/gui/message.rs
index bc6473a..1ae10a5 100644
--- a/src/gui/message.rs
+++ b/src/gui/message.rs
@@ -33,8 +33,13 @@ pub fn show<B: Backend>(
})?;
if wait {
- if let Event::Input(Key::Char('q')) = events.next()? {
- break;
+ if let Event::Input(key) = events.next()? {
+ match key {
+ Key::Char('q') | Key::Ctrl('c') => {
+ break;
+ }
+ _ => {}
+ }
}
} else {
break;