1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

allowing commit files to be viewed in reflog as well

This commit is contained in:
Jesse Duffield
2020-08-21 09:12:45 +10:00
parent 48f1adad49
commit ddf25e14af
9 changed files with 90 additions and 39 deletions

View File

@ -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{