1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Remove return value of IContextMgr.Push/Pop et. al.

This commit is contained in:
Stefan Haller
2024-09-04 18:33:48 +02:00
parent 072b465fa6
commit 371998e635
42 changed files with 137 additions and 162 deletions

View File

@@ -17,9 +17,7 @@ func (gui *Gui) handleCreateExtrasMenuPanel() error {
OnPress: func() error {
currentContext := gui.c.Context().CurrentStatic()
if gui.c.State().GetShowExtrasWindow() && currentContext.GetKey() == context.COMMAND_LOG_CONTEXT_KEY {
if err := gui.c.Context().Pop(); err != nil {
return err
}
gui.c.Context().Pop()
}
show := !gui.c.State().GetShowExtrasWindow()
gui.c.State().SetShowExtrasWindow(show)
@@ -40,7 +38,8 @@ func (gui *Gui) handleFocusCommandLog() error {
gui.c.State().SetShowExtrasWindow(true)
// TODO: is this necessary? Can't I just call 'return from context'?
gui.State.Contexts.CommandLog.SetParentContext(gui.c.Context().CurrentSide())
return gui.c.Context().Push(gui.State.Contexts.CommandLog)
gui.c.Context().Push(gui.State.Contexts.CommandLog)
return nil
}
func (gui *Gui) scrollUpExtra() error {