summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-03-02 13:22:02 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-03-02 17:45:53 +1100
commit1337f6e76ad5a9293b2d32fd29cbe91e750814c6 (patch)
tree6ae1f0d78f6550d0c0b6f04e195303f08072077a /pkg/gui/branches_panel.go
parent4de31da4bee9c622d4c6b7152e4d918b79cb4a94 (diff)
appease golangci
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index bd6db352c..fdc35862f 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -22,6 +22,13 @@ func (gui *Gui) getSelectedBranch() *commands.Branch {
// may want to standardise how these select methods work
func (gui *Gui) handleBranchSelect(g *gocui.Gui, v *gocui.View) error {
+ if gui.popupPanelFocused() {
+ return nil
+ }
+
+ if _, err := gui.g.SetCurrentView(v.Name()); err != nil {
+ return err
+ }
// This really shouldn't happen: there should always be a master branch
if len(gui.State.Branches) == 0 {
return gui.renderString(g, "main", gui.Tr.SLocalize("NoBranchesThisRepo"))