1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

rename to SelectedLineIdx

This commit is contained in:
Jesse Duffield
2020-08-20 08:53:10 +10:00
parent eb5e54e9fd
commit 146722beb8
14 changed files with 67 additions and 67 deletions

View File

@ -102,15 +102,15 @@ type Gui struct {
}
type listPanelState struct {
SelectedLine int
SelectedLineIdx int
}
func (h *listPanelState) SetSelectedLineIdx(value int) {
h.SelectedLine = value
h.SelectedLineIdx = value
}
func (h *listPanelState) GetSelectedLineIdx() int {
return h.SelectedLine
return h.SelectedLineIdx
}
type IListPanelState interface {
@ -284,16 +284,16 @@ func (gui *Gui) resetState() {
CherryPickedCommits: make([]*commands.Commit, 0),
StashEntries: make([]*commands.StashEntry, 0),
Panels: &panelStates{
Files: &filePanelState{listPanelState{SelectedLine: -1}},
Branches: &branchPanelState{listPanelState{SelectedLine: 0}},
Remotes: &remotePanelState{listPanelState{SelectedLine: 0}},
RemoteBranches: &remoteBranchesState{listPanelState{SelectedLine: -1}},
Tags: &tagsPanelState{listPanelState{SelectedLine: -1}},
Commits: &commitPanelState{listPanelState: listPanelState{SelectedLine: -1}, LimitCommits: true},
ReflogCommits: &reflogCommitPanelState{listPanelState{SelectedLine: 0}}, // TODO: might need to make -1
CommitFiles: &commitFilesPanelState{listPanelState{SelectedLine: -1}},
Stash: &stashPanelState{listPanelState{SelectedLine: -1}},
Menu: &menuPanelState{listPanelState: listPanelState{SelectedLine: 0}, OnPress: nil},
Files: &filePanelState{listPanelState{SelectedLineIdx: -1}},
Branches: &branchPanelState{listPanelState{SelectedLineIdx: 0}},
Remotes: &remotePanelState{listPanelState{SelectedLineIdx: 0}},
RemoteBranches: &remoteBranchesState{listPanelState{SelectedLineIdx: -1}},
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}},
Stash: &stashPanelState{listPanelState{SelectedLineIdx: -1}},
Menu: &menuPanelState{listPanelState: listPanelState{SelectedLineIdx: 0}, OnPress: nil},
Merging: &mergingPanelState{
ConflictIndex: 0,
ConflictTop: true,