Skip to content

Commit

Permalink
fix: disable menu key binding while displaying popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryooooooga committed Feb 9, 2023
1 parent c713d19 commit 1be6c52
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/gui/options_menu_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ func uniqueBindings(bindings []*types.Binding) []*types.Binding {
}

func (gui *Gui) handleCreateOptionsMenu() error {
context := gui.currentContext()
bindings := gui.getBindings(context)
ctx := gui.currentContext()
// Don't show menu while displaying popup.
if ctx.GetKind() == types.PERSISTENT_POPUP || ctx.GetKind() == types.TEMPORARY_POPUP {
return nil
}

bindings := gui.getBindings(ctx)

menuItems := slices.Map(bindings, func(binding *types.Binding) *types.MenuItem {
return &types.MenuItem{
Expand Down

0 comments on commit 1be6c52

Please sign in to comment.