summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-17 09:42:17 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-21 22:07:14 +1100
commit6bd0979b4a31c64ef813c581e5571e3d730bffda (patch)
treef348398112fe615047f4990d472d0743b22de04d /pkg/gui/gui.go
parent986abc1e45e314e68beb7c0ba92804e60c99310b (diff)
only refresh branches panel on focus lost when in the local-branches context
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go10
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