1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

fix: disable menu key binding while displaying popup

This commit is contained in:
Ryooooooga 2023-02-05 21:01:15 +09:00
parent c713d19383
commit 1be6c522d8
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25

View File

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