Allow using Ctrl-c to exit (#53)

This commit is contained in:
Ellie Huxtable 2021-05-08 00:02:39 +01:00 committed by GitHub
parent 086f4cc27c
commit 99f26ff383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,7 @@ async fn key_handler(
app: &mut State,
) -> Option<String> {
match input {
Key::Esc => return Some(String::from("")),
Key::Esc | Key::Ctrl('c') => return Some(String::from("")),
Key::Char('\n') => {
let i = app.results_state.selected().unwrap_or(0);