diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-19 19:16:00 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | d4f134c6c7476e42ccd011a22bd31a195a6bc88d (patch) | |
tree | 623b4fab0cdd26663610a9aed98cf775190fb46c /pkg/gui | |
parent | 7ebed76d16026348abf586ff19e534f7297d7fce (diff) |
WIP
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/reset_menu_panel.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pkg/gui/reset_menu_panel.go b/pkg/gui/reset_menu_panel.go index 4267fbb72..d75e01509 100644 --- a/pkg/gui/reset_menu_panel.go +++ b/pkg/gui/reset_menu_panel.go @@ -12,23 +12,20 @@ func (gui *Gui) resetToRef(ref string, strength string, options commands.RunComm return gui.surfaceError(err) } - if err := gui.switchCommitsPanelContext("branch-commits"); err != nil { - return err - } - gui.State.Panels.Commits.SelectedLine = 0 gui.State.Panels.ReflogCommits.SelectedLine = 0 // loading a heap of commits is slow so we limit them whenever doing a reset gui.State.Panels.Commits.LimitCommits = true - if err := gui.refreshSidePanels(refreshOptions{scope: []int{FILES, BRANCHES, REFLOG, COMMITS}}); err != nil { + if err := gui.switchContext(gui.Contexts.BranchCommits.Context); err != nil { return err } - if err := gui.resetOrigin(gui.getCommitsView()); err != nil { + + if err := gui.refreshSidePanels(refreshOptions{scope: []int{FILES, BRANCHES, REFLOG, COMMITS}}); err != nil { return err } - return gui.handleCommitSelect() + return nil } func (gui *Gui) createResetMenu(ref string) error { |