diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-18 09:38:36 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 22:07:14 +1100 |
commit | 3c1322914518168374be02a78cee968cf1d13730 (patch) | |
tree | d31c1064a1101a6081db025328f39789fc3b74c4 /pkg/gui/branches_panel.go | |
parent | cea24c2cf98c48e187900041d9e3bbeb93596019 (diff) |
add tags panel
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r-- | pkg/gui/branches_panel.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index 790f24bd4..f78d86ab8 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -80,6 +80,10 @@ func (gui *Gui) refreshBranches(g *gocui.Gui) error { return err } + if err := gui.refreshTags(); err != nil { + return err + } + g.Update(func(g *gocui.Gui) error { builder, err := commands.NewBranchListBuilder(gui.Log, gui.GitCommand) if err != nil { @@ -373,7 +377,7 @@ func (gui *Gui) handleFastForward(g *gocui.Gui, v *gocui.View) error { } func (gui *Gui) onBranchesTabClick(tabIndex int) error { - contexts := []string{"local-branches", "remotes", "tabs"} + contexts := []string{"local-branches", "remotes", "tags"} branchesView := gui.getBranchesView() branchesView.TabIndex = tabIndex @@ -388,6 +392,7 @@ func (gui *Gui) switchBranchesPanelContext(context string) error { "local-branches": 0, "remotes": 1, "remote-branches": 1, + "tags": 2, } branchesView.TabIndex = contextTabIndexMap[context] @@ -399,6 +404,8 @@ func (gui *Gui) switchBranchesPanelContext(context string) error { return gui.renderRemotesWithSelection() case "remote-branches": return gui.renderRemoteBranchesWithSelection() + case "tags": + return gui.renderTagsWithSelection() } return nil |