diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 09:12:45 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | ddf25e14afe5ddfc2527149c54ea55ea2e83610a (patch) | |
tree | a75ce97a36ce9ec3e4215c20e2a26e82fea81304 /pkg/gui/gui.go | |
parent | 48f1adad49c01cf7f093e8f9921582690bef55a7 (diff) |
allowing commit files to be viewed in reflog as well
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 4a0e1097e..e0ab0c724 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -184,6 +184,10 @@ type menuPanelState struct { type commitFilesPanelState struct { listPanelState + + // this is the SHA of the commit or the stash index of the stash. + // Not sure if ref is actually the right word here + refName string } type panelStates struct { @@ -291,7 +295,7 @@ func (gui *Gui) resetState() { Tags: &tagsPanelState{listPanelState{SelectedLineIdx: -1}}, Commits: &commitPanelState{listPanelState: listPanelState{SelectedLineIdx: -1}, LimitCommits: true}, ReflogCommits: &reflogCommitPanelState{listPanelState{SelectedLineIdx: 0}}, // TODO: might need to make -1 - CommitFiles: &commitFilesPanelState{listPanelState{SelectedLineIdx: -1}}, + CommitFiles: &commitFilesPanelState{listPanelState: listPanelState{SelectedLineIdx: -1}, refName: ""}, Stash: &stashPanelState{listPanelState{SelectedLineIdx: -1}}, Menu: &menuPanelState{listPanelState: listPanelState{SelectedLineIdx: 0}, OnPress: nil}, Merging: &mergingPanelState{ |