Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 53b6a78

Browse files
committedJul 20, 2023
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

Lines changed: 5 additions & 0 deletions
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)
Please sign in to comment.