summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-16 16:20:05 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-21 22:07:14 +1100
commit92e43d9e7776cd2e1796bf280756c6ffa7c8dbe2 (patch)
treeac3b7ee152e6b8cde6268d8c329334041cfe0d97 /pkg/gui/branches_panel.go
parent325408d0e3db8e1b7d0b6915986f1a684ee8b257 (diff)
allow changing tabs with [ and ]
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index 015f51739..a05d3ed2a 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -372,3 +372,15 @@ func (gui *Gui) refreshRemotes() error {
return nil
}
+
+func (gui *Gui) handleNextBranchesTab(g *gocui.Gui, v *gocui.View) error {
+ return gui.onBranchesTabClick(
+ utils.ModuloWithWrap(v.TabIndex+1, len(v.Tabs)),
+ )
+}
+
+func (gui *Gui) handlePrevBranchesTab(g *gocui.Gui, v *gocui.View) error {
+ return gui.onBranchesTabClick(
+ utils.ModuloWithWrap(v.TabIndex-1, len(v.Tabs)),
+ )
+}