summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index e524ef9a2..fa60b5ed7 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -445,3 +445,12 @@ func (gui *Gui) handleNewBranchOffCurrentItem() error {
func sanitizedBranchName(input string) string {
return strings.Replace(input, " ", "-", -1)
}
+
+func (gui *Gui) handleEnterBranch() error {
+ branch := gui.getSelectedBranch()
+ if branch == nil {
+ return nil
+ }
+
+ return gui.switchToSubCommitsContext(branch.RefName())
+}