From e4e1ed4f735d35524c23be0dc5f5f6563822e64a Mon Sep 17 00:00:00 2001 From: Armin Friedl Date: Sun, 14 Nov 2021 21:38:12 +0100 Subject: [PATCH] Don't quickswitch without input --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 422fe74..7d94219 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,7 +111,9 @@ impl RoftlLoop { trace!{"Narrow result {:?}", results} // quick switch if only one result - if results.len() == 1 { + // but make sure that input buffer is filled, otherwise will immediately close + // if there is only one window + if results.len() == 1 && !self.input_buffer.is_empty() { self.roftl.exec_default(0); *flow = ControlFlow::Exit; return;