From bf6780967b5174274da7faf68d9573c580a2dcb6 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Thu, 16 Dec 2021 22:11:06 +0100 Subject: [PATCH] Make dialoguer completion abortable (#507) Fixes #505 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9817f9d337..0d52bca078 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 {