diff options
author | Joris | 2022-11-02 14:52:31 +0100 |
---|---|---|
committer | Joris | 2022-11-02 14:52:31 +0100 |
commit | f770efb58c84a78c3bcefc6e8f91b9001ec6d755 (patch) | |
tree | 7bb71f1b299e66d5682962fce439c6125e11c232 /src | |
parent | 2123e99f29a2ea7ccb73a072ecd7276f1eab9655 (diff) |
Allow to use Control-C to quit in message
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/message.rs | 9 |
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; |