diff options
-rw-r--r-- | pkg/gui/gui.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index f499895a1..e66df31d8 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -263,20 +263,19 @@ func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) error { if v == nil { return nil } - gui.State.SplitMainPanel = false - if v.Name() == "branches" { + switch v.Name() { + case "branches": // This stops the branches panel from showing the upstream/downstream changes to the selected branch, when it loses focus // inside renderListPanel it checks to see if the panel has focus if err := gui.renderListPanel(gui.getBranchesView(), gui.State.Branches); err != nil { return err } - } else if v.Name() == "main" { + case "main": // if we have lost focus to a first-class panel, we need to do some cleanup if err := gui.changeContext("main", "normal"); err != nil { return err } - - } else if v.Name() == "commitFiles" { + case "commitFiles": if _, err := gui.g.SetViewOnBottom(v.Name()); err != nil { return err } |