diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-17 09:42:17 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 22:07:14 +1100 |
commit | 6bd0979b4a31c64ef813c581e5571e3d730bffda (patch) | |
tree | f348398112fe615047f4990d472d0743b22de04d | |
parent | 986abc1e45e314e68beb7c0ba92804e60c99310b (diff) |
only refresh branches panel on focus lost when in the local-branches context
-rw-r--r-- | pkg/gui/gui.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index f4a343626..ffb9e00d3 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -314,10 +314,12 @@ func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) error { } 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 + if v.Context == "local-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 + } } case "main": // if we have lost focus to a first-class panel, we need to do some cleanup |