diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-16 16:38:38 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 22:07:14 +1100 |
commit | 61dac10bb94874800d7b955c875cbcc3b3efa546 (patch) | |
tree | 8a70a7645b60eeaf31b4725525dff112af581bb3 /pkg/gui/view_helpers.go | |
parent | b5385f2560d10fe74af34d9b09c7ebbfe0a46424 (diff) |
support navigating remotes view
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": |