1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-20 05:19:24 +02:00

fix issue where custom command would not open a menu

This commit is contained in:
Jesse Duffield 2022-01-15 09:47:19 +11:00
parent 4744b39f03
commit 8263d15b03

View File

@ -5,6 +5,7 @@ import (
"fmt"
"strings"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
)
@ -88,7 +89,11 @@ func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions cr
menuView.SetContent(list)
gui.State.Panels.Menu.SelectedLineIdx = 0
return gui.pushContext(gui.State.Contexts.Menu)
gui.g.Update(func(g *gocui.Gui) error {
return gui.pushContext(gui.State.Contexts.Menu)
})
return nil
}
func (gui *Gui) onMenuPress() error {