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

move more actions into controller

This commit is contained in:
Jesse Duffield
2023-03-23 22:05:25 +11:00
parent 71753770ad
commit f8c9ce33c2
12 changed files with 160 additions and 123 deletions

View File

@ -124,7 +124,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
gui.State.ViewsSetup = true
}
for _, listContext := range gui.getListContexts() {
for _, listContext := range gui.c.Context().AllList() {
view, err := gui.g.View(listContext.GetViewName())
if err != nil {
continue
@ -138,7 +138,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
view.SetOnSelectItem(gui.onSelectItemWrapper(listContext.OnSearchSelect))
}
for _, context := range gui.getPatchExplorerContexts() {
for _, context := range gui.c.Context().AllPatchExplorer() {
context := context
context.GetView().SetOnSelectItem(gui.onSelectItemWrapper(
func(selectedLineIdx int) error {