summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorskanehira <sho19921005@gmail.com>2019-03-09 23:42:10 +0900
committerJesse Duffield <jessedduffield@gmail.com>2019-03-16 10:20:27 +1100
commit06fe726ee79d3993d936ae3e064761273b657ae8 (patch)
tree1da4c337f9e506944f762c09ba930451c5c823b4 /pkg/gui/gui.go
parent1b6e46973ebfdb6ba873fac6a2ce05bb1f8db8c1 (diff)
Add feature of display committed file list #383
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go28
1 files changed, 21 insertions, 7 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 89b99a919..f156a6d60 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -114,14 +114,19 @@ type menuPanelState struct {
SelectedLine int
}
+type commitFilesPanelState struct {
+ SelectedLine int
+}
+
type panelStates struct {
- Files *filePanelState
- Branches *branchPanelState
- Commits *commitPanelState
- Stash *stashPanelState
- Menu *menuPanelState
- Staging *stagingPanelState
- Merging *mergingPanelState
+ Files *filePanelState
+ Branches *branchPanelState
+ Commits *commitPanelState
+ Stash *stashPanelState
+ Menu *menuPanelState
+ Staging *stagingPanelState
+ Merging *mergingPanelState
+ CommitFiles *commitFilesPanelState
}
type guiState struct {
@@ -129,6 +134,7 @@ type guiState struct {
Branches []*commands.Branch
Commits []*commands.Commit
StashEntries []*commands.StashEntry
+ CommitFiles []*commands.CommitFile
PreviousView string
Platform commands.Platform
Updating bool
@@ -352,6 +358,14 @@ func (gui *Gui) layout(g *gocui.Gui) error {
branchesView.FgColor = gocui.ColorWhite
}
+ if v, err := g.SetView("commit files", 0, commitsBranchesBoundary+panelSpacing, leftSideWidth, commitsStashBoundary, gocui.TOP|gocui.BOTTOM); err != nil {
+ if err.Error() != "unknown view" {
+ return err
+ }
+ v.Title = gui.Tr.SLocalize("CommitFiles")
+ v.FgColor = gocui.ColorWhite
+ }
+
commitsView, err := g.SetView("commits", 0, commitsBranchesBoundary+panelSpacing, leftSideWidth, commitsStashBoundary, gocui.TOP|gocui.BOTTOM)
if err != nil {
if err.Error() != "unknown view" {