1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Cleanup: get rid of the variadic parameter of ContextMgr.Push

Apparently this was an attempt at working around go's lack of default arguments,
but it's very unidiomatic and a bit confusing. Make it a normal parameter
instead, so all clients have to pass it explicitly.
This commit is contained in:
Stefan Haller
2024-10-10 14:35:28 +02:00
parent 9c98fd809c
commit b3215a750c
29 changed files with 36 additions and 46 deletions

View File

@ -60,6 +60,6 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
gui.c.PostRefreshUpdate(gui.State.Contexts.Menu)
// TODO: ensure that if we're opened a menu from within a menu that it renders correctly
gui.c.Context().Push(gui.State.Contexts.Menu)
gui.c.Context().Push(gui.State.Contexts.Menu, types.OnFocusOpts{})
return nil
}