Skip to content

Commit

Permalink
only refresh branches panel on focus lost when in the local-branches …
Browse files Browse the repository at this point in the history
…context
  • Loading branch information
jesseduffield committed Nov 21, 2019
1 parent 986abc1 commit 6bd0979
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bd0979

Please sign in to comment.