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/gui.go | |
parent | cea24c2cf98c48e187900041d9e3bbeb93596019 (diff) |
add tags panel
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index c08c82817..3b6f2fb11 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -120,6 +120,10 @@ type remoteBranchesState struct { SelectedLine int } +type tagsPanelState struct { + SelectedLine int +} + type commitPanelState struct { SelectedLine int SpecificDiffMode bool @@ -148,6 +152,7 @@ type panelStates struct { Branches *branchPanelState Remotes *remotePanelState RemoteBranches *remoteBranchesState + Tags *tagsPanelState Commits *commitPanelState Stash *stashPanelState Menu *menuPanelState @@ -166,6 +171,7 @@ type guiState struct { DiffEntries []*commands.Commit Remotes []*commands.Remote RemoteBranches []*commands.RemoteBranch + Tags []*commands.Tag MenuItemCount int // can't store the actual list because it's of interface{} type PreviousView string Platform commands.Platform @@ -198,6 +204,7 @@ func NewGui(log *logrus.Entry, gitCommand *commands.GitCommand, oSCommand *comma Branches: &branchPanelState{SelectedLine: 0}, Remotes: &remotePanelState{SelectedLine: 0}, RemoteBranches: &remoteBranchesState{SelectedLine: -1}, + Tags: &tagsPanelState{SelectedLine: -1}, Commits: &commitPanelState{SelectedLine: -1}, CommitFiles: &commitFilesPanelState{SelectedLine: -1}, Stash: &stashPanelState{SelectedLine: -1}, @@ -497,7 +504,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { return err } branchesView.Title = gui.Tr.SLocalize("BranchesTitle") - branchesView.Tabs = []string{"Local Branches", "Remotes"} + branchesView.Tabs = []string{"Local Branches", "Remotes", "Tags"} branchesView.FgColor = textColor } |