Don't quickswitch without input

This commit is contained in:
Armin Friedl 2021-11-14 21:38:12 +01:00
parent e7a6dc2237
commit e4e1ed4f73

View file

@ -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;