From f770efb58c84a78c3bcefc6e8f91b9001ec6d755 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 2 Nov 2022 14:52:31 +0100 Subject: Allow to use Control-C to quit in message --- src/gui/message.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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( })?; 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; -- cgit v1.2.3