Handle exit key correctly

This commit is contained in:
Dheepak Krishnamurthy 2020-07-26 17:29:33 -06:00
parent b730c11d36
commit 3fb3d1c4e2

View file

@ -37,10 +37,11 @@ fn main() -> Result<(), Box<dyn Error>> {
let mut terminal = setup_terminal()?;
// Setup event handlers
let events = Events::with_config(Config {
let mut events = Events::with_config(Config {
exit_key: Key::Char('q'),
tick_rate: Duration::from_secs(5),
tick_rate: Duration::from_secs(1),
});
events.disable_exit_key();
let mut app = App::new();
app.next();