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:
@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user