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

extract out some logic for list views

This commit is contained in:
Jesse Duffield
2019-11-16 14:00:27 +11:00
parent 7e0a8f235e
commit 8aa1062e06
10 changed files with 194 additions and 188 deletions

View File

@ -110,7 +110,6 @@ type filePanelState struct {
// TODO: consider splitting this out into the window and the branches view
type branchPanelState struct {
SelectedLine int
ContextIndex int
}
type remotePanelState struct {
@ -490,7 +489,6 @@ func (gui *Gui) layout(g *gocui.Gui) error {
}
branchesView.Title = gui.Tr.SLocalize("BranchesTitle")
branchesView.Tabs = []string{"Local Branches", "Remotes"}
branchesView.TabIndex = gui.State.Panels.Branches.ContextIndex
branchesView.FgColor = textColor
}
@ -632,6 +630,8 @@ func (gui *Gui) onInitialViewsCreation() error {
return err
}
gui.getBranchesView().Context = "local-branches"
return gui.loadNewRepo()
}