diff options
Diffstat (limited to 'pkg/gui/submodules_panel.go')
-rw-r--r-- | pkg/gui/submodules_panel.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pkg/gui/submodules_panel.go b/pkg/gui/submodules_panel.go index 490347c5d..3f25e077d 100644 --- a/pkg/gui/submodules_panel.go +++ b/pkg/gui/submodules_panel.go @@ -8,18 +8,9 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/style" ) -func (gui *Gui) getSelectedSubmodule() *models.SubmoduleConfig { - selectedLine := gui.State.Panels.Submodules.SelectedLineIdx - if selectedLine == -1 || len(gui.State.Model.Submodules) == 0 { - return nil - } - - return gui.State.Model.Submodules[selectedLine] -} - func (gui *Gui) submodulesRenderToMain() error { var task updateTask - submodule := gui.getSelectedSubmodule() + submodule := gui.State.Contexts.Submodules.GetSelected() if submodule == nil { task = NewRenderStringTask("No submodules") } else { |