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;