diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-15 17:01:43 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-15 18:01:43 +1000 |
commit | 15229bbdab5d99ce7f390a7e215a572ab155a5ac (patch) | |
tree | 37b8bf40eef59c13b198b14dce679e1afcfcc85b /pkg/gui/reflog_panel.go | |
parent | 63e6eea9ecd52c908e75f9f1d456589d1574872e (diff) |
more removing of g and v
Diffstat (limited to 'pkg/gui/reflog_panel.go')
-rw-r--r-- | pkg/gui/reflog_panel.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/reflog_panel.go b/pkg/gui/reflog_panel.go index 0077502b3..66be53e55 100644 --- a/pkg/gui/reflog_panel.go +++ b/pkg/gui/reflog_panel.go @@ -18,14 +18,14 @@ func (gui *Gui) getSelectedReflogCommit() *commands.Commit { return reflogComits[selectedLine] } -func (gui *Gui) handleReflogCommitSelect(g *gocui.Gui, v *gocui.View) error { +func (gui *Gui) handleReflogCommitSelect() error { if gui.popupPanelFocused() { return nil } gui.State.SplitMainPanel = false - if _, err := gui.g.SetCurrentView(v.Name()); err != nil { + if _, err := gui.g.SetCurrentView("commits"); err != nil { return err } @@ -35,7 +35,7 @@ func (gui *Gui) handleReflogCommitSelect(g *gocui.Gui, v *gocui.View) error { if commit == nil { return gui.newStringTask("main", "No reflog history") } - v.FocusPoint(0, gui.State.Panels.ReflogCommits.SelectedLine) + gui.getCommitsView().FocusPoint(0, gui.State.Panels.ReflogCommits.SelectedLine) if gui.inDiffMode() { return gui.renderDiff() @@ -107,7 +107,7 @@ func (gui *Gui) renderReflogCommitsWithSelection() error { displayStrings := presentation.GetReflogCommitListDisplayStrings(gui.State.FilteredReflogCommits, gui.State.ScreenMode != SCREEN_NORMAL, gui.State.Diff.Ref) gui.renderDisplayStrings(commitsView, displayStrings) if gui.g.CurrentView() == commitsView && commitsView.Context == "reflog-commits" { - if err := gui.handleReflogCommitSelect(gui.g, commitsView); err != nil { + if err := gui.handleReflogCommitSelect(); err != nil { return err } } |