diff options
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index c23bf3e47..076567386 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -5,6 +5,7 @@ import ( "sort" "strings" + "github.com/go-errors/errors" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/spkg/bom" @@ -103,7 +104,15 @@ func (gui *Gui) newLineFocused(g *gocui.Gui, v *gocui.View) error { case "files": return gui.handleFileSelect(g, v) case "branches": - return gui.handleBranchSelect(g, v) + branchesView := gui.getBranchesView() + switch branchesView.Context { + case "local-branches": + return gui.handleBranchSelect(g, v) + case "remotes": + return gui.handleRemoteSelect(g, v) + default: + return errors.New("unknown branches panel context: " + branchesView.Context) + } case "commits": return gui.handleCommitSelect(g, v) case "commitFiles": |