From 2bb8900e6b669119f15a1a5adb34099375c0b8c3 Mon Sep 17 00:00:00 2001 From: Ferran Basora Date: Fri, 15 May 2020 16:30:09 +0000 Subject: [PATCH] Fix bug with no hints --- src/view.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/view.rs b/src/view.rs index 0a85562..40bc3b8 100644 --- a/src/view.rs +++ b/src/view.rs @@ -151,6 +151,10 @@ impl<'a> View<'a> { } fn listen(&mut self, stdin: &mut dyn Read, stdout: &mut dyn Write) -> CaptureEvent { + if self.matches.is_empty() { + return CaptureEvent::Exit + } + let mut chosen = vec![]; let mut typed_hint: String = "".to_owned(); let longest_hint = self