Skip to content

Commit 53b6a78

Browse files
committed
handle empty menu as inapplicable
1 parent c8bc5ac commit 53b6a78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/engine.rs

+5
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,11 @@ impl Reedline {
879879
return Ok(EventStatus::Handled);
880880
}
881881

882+
if menu.get_values().len() == 0 {
883+
menu.menu_event(MenuEvent::Deactivate);
884+
return Ok(EventStatus::Inapplicable);
885+
}
886+
882887
return Ok(EventStatus::Handled);
883888
}
884889
}

0 commit comments

Comments
 (0)