mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
fix issue where custom command would not open a menu
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/jesseduffield/gocui"
|
||||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||||
)
|
)
|
||||||
@ -88,7 +89,11 @@ func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions cr
|
|||||||
menuView.SetContent(list)
|
menuView.SetContent(list)
|
||||||
gui.State.Panels.Menu.SelectedLineIdx = 0
|
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 {
|
func (gui *Gui) onMenuPress() error {
|
||||||
|
Reference in New Issue
Block a user