diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-15 17:23:16 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-15 18:01:43 +1000 |
commit | 9b7a6934b333755d9408aca5eeb48678f8d98ebb (patch) | |
tree | c2ee77cb31f5281473de71591fcf09383d7c7149 /pkg/gui/staging_panel.go | |
parent | 15229bbdab5d99ce7f390a7e215a572ab155a5ac (diff) |
more removing of g
Diffstat (limited to 'pkg/gui/staging_panel.go')
-rw-r--r-- | pkg/gui/staging_panel.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/staging_panel.go b/pkg/gui/staging_panel.go index 7d8a1e088..0496fed96 100644 --- a/pkg/gui/staging_panel.go +++ b/pkg/gui/staging_panel.go @@ -24,11 +24,11 @@ func (gui *Gui) refreshStagingPanel(forceSecondaryFocused bool, selectedLineIdx if err != gui.Errors.ErrNoFiles { return err } - return gui.handleStagingEscape(gui.g, nil) + return gui.handleStagingEscape() } if !file.HasUnstagedChanges && !file.HasStagedChanges { - return gui.handleStagingEscape(gui.g, nil) + return gui.handleStagingEscape() } secondaryFocused := false @@ -60,7 +60,7 @@ func (gui *Gui) refreshStagingPanel(forceSecondaryFocused bool, selectedLineIdx // 4-5 lines in which case we'll swap panels if len(strings.Split(diff, "\n")) < 5 { if len(strings.Split(secondaryDiff, "\n")) < 5 { - return gui.handleStagingEscape(gui.g, nil) + return gui.handleStagingEscape() } secondaryFocused = !secondaryFocused diff, secondaryDiff = secondaryDiff, diff @@ -72,7 +72,7 @@ func (gui *Gui) refreshStagingPanel(forceSecondaryFocused bool, selectedLineIdx } if empty { - return gui.handleStagingEscape(gui.g, nil) + return gui.handleStagingEscape() } return nil @@ -93,7 +93,7 @@ func (gui *Gui) handleTogglePanel(g *gocui.Gui, v *gocui.View) error { return gui.refreshStagingPanel(false, -1) } -func (gui *Gui) handleStagingEscape(g *gocui.Gui, v *gocui.View) error { +func (gui *Gui) handleStagingEscape() error { gui.handleEscapeLineByLinePanel() return gui.switchFocus(nil, gui.getFilesView()) |