diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-02-06 14:37:16 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | b93b8cc00a2f2ea339b1ecdbc380320556490d3b (patch) | |
tree | e831d088c2031c6dcc1f678f5c3af0cfc20c91ed /pkg/gui/sub_commits_panel.go | |
parent | cd31a762b97c071fbd33ea9b82f679890e68eaa7 (diff) |
controller for viewing sub commits
Diffstat (limited to 'pkg/gui/sub_commits_panel.go')
-rw-r--r-- | pkg/gui/sub_commits_panel.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/sub_commits_panel.go b/pkg/gui/sub_commits_panel.go index 04c131625..ddcb8f096 100644 --- a/pkg/gui/sub_commits_panel.go +++ b/pkg/gui/sub_commits_panel.go @@ -45,7 +45,7 @@ func (gui *Gui) handleCheckoutSubCommit() error { return err } - gui.State.Contexts.SubCommits.GetPanelState().SetSelectedLineIdx(0) + gui.State.Contexts.SubCommits.SetSelectedLineIdx(0) return nil } @@ -74,7 +74,7 @@ func (gui *Gui) switchToSubCommitsContext(refName string) error { // need to populate my sub commits commits, err := gui.git.Loaders.Commits.GetCommits( loaders.GetCommitsOptions{ - Limit: gui.State.LimitCommits, + Limit: true, FilterPath: gui.State.Modes.Filtering.GetPath(), IncludeRebaseCommits: false, RefName: refName, @@ -85,7 +85,7 @@ func (gui *Gui) switchToSubCommitsContext(refName string) error { } gui.State.Model.SubCommits = commits - gui.State.Contexts.SubCommits.GetPanelState().SetSelectedLineIdx(0) + gui.State.Contexts.SubCommits.SetSelectedLineIdx(0) gui.State.Contexts.SubCommits.SetParentContext(gui.currentSideListContext()) return gui.c.PushContext(gui.State.Contexts.SubCommits) @@ -116,5 +116,5 @@ func (gui *Gui) handleCopySubCommitRange() error { return nil } - return gui.helpers.CherryPick.CopyRange(gui.State.Contexts.SubCommits.GetPanelState().GetSelectedLineIdx(), gui.State.Model.SubCommits, gui.State.Contexts.SubCommits) + return gui.helpers.CherryPick.CopyRange(gui.State.Contexts.SubCommits.GetSelectedLineIdx(), gui.State.Model.SubCommits, gui.State.Contexts.SubCommits) } |