summaryrefslogtreecommitdiffstats
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 21:15:27 +1100
commit620e49b8e3a02df9020eb7fa753862020193cd09 (patch)
treef348398112fe615047f4990d472d0743b22de04d
parent3b7e4cf2e6941b0abd854ea342f4719b6f4775de (diff)
only refresh branches panel on focus lost when in the local-branches context
-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