diff --git a/src/engine.rs b/src/engine.rs index 1c3c488c..3ece6d4c 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -879,6 +879,11 @@ impl Reedline { return Ok(EventStatus::Handled); } + if menu.get_values().len() == 0 { + menu.menu_event(MenuEvent::Deactivate); + return Ok(EventStatus::Inapplicable); + } + return Ok(EventStatus::Handled); } }