Make dialoguer completion abortable (#507)

Fixes #505
This commit is contained in:
Stefan Holderbach 2021-12-16 22:11:06 +01:00 committed by GitHub
parent a148ad8697
commit bf6780967b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,7 +64,7 @@ impl CompletionActionHandler for FuzzyCompletion {
.default(0)
.items(&selections[..])
.interact_on_opt(&Term::stdout())
.expect("Fuzzy completion interact on operation");
.unwrap_or(None);
let _ = crossterm::terminal::enable_raw_mode();
if let Some(result) = result {