From efb26f8b60a2b6b807a00595cbd3ae8cbe587850 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Mon, 10 Feb 2020 18:56:48 +1100 Subject: [PATCH] refresh current branch graph when side panels refresh --- pkg/gui/branches_panel.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index ff77c9cb4..8fa6b83ca 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -97,8 +97,7 @@ func (gui *Gui) refreshBranches(g *gocui.Gui) error { // TODO: if we're in the remotes view and we've just deleted a remote we need to refresh accordingly if gui.getBranchesView().Context == "local-branches" { - gui.refreshSelectedLine(&gui.State.Panels.Branches.SelectedLine, len(gui.State.Branches)) - if err := gui.RenderSelectedBranchUpstreamDifferences(); err != nil { + if err := gui.renderLocalBranchesWithSelection(); err != nil { return err } } @@ -112,10 +111,10 @@ func (gui *Gui) renderLocalBranchesWithSelection() error { branchesView := gui.getBranchesView() gui.refreshSelectedLine(&gui.State.Panels.Branches.SelectedLine, len(gui.State.Branches)) - if err := gui.renderListPanel(branchesView, gui.State.Branches); err != nil { + if err := gui.RenderSelectedBranchUpstreamDifferences(); err != nil { return err } - if gui.g.CurrentView() == branchesView && branchesView.Context == "local-branches" { + if gui.g.CurrentView() == branchesView { if err := gui.handleBranchSelect(gui.g, branchesView); err != nil { return err }