diff options
Diffstat (limited to 'src/gui/message.rs')
-rw-r--r-- | src/gui/message.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/message.rs b/src/gui/message.rs index f0d826a..61f57ba 100644 --- a/src/gui/message.rs +++ b/src/gui/message.rs @@ -1,6 +1,6 @@ use crate::gui::util; -use crossterm::event::{self, Event, KeyCode, KeyModifiers}; use anyhow::Result; +use crossterm::event::{self, Event, KeyCode, KeyModifiers}; use tui::{ backend::Backend, layout::{Alignment, Constraint, Direction, Layout}, @@ -32,7 +32,10 @@ pub fn show<B: Backend>( if wait { if let Event::Key(key) = event::read()? { - if key.code == KeyCode::Char('q') || key.code == KeyCode::Char('c') && key.modifiers.contains(KeyModifiers::CONTROL) { + if key.code == KeyCode::Char('q') + || key.code == KeyCode::Char('c') + && key.modifiers.contains(KeyModifiers::CONTROL) + { break; } } |