diff options
Diffstat (limited to 'pkg/gui/undoing.go')
-rw-r--r-- | pkg/gui/undoing.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/undoing.go b/pkg/gui/undoing.go index 4bdff1421..3ef863539 100644 --- a/pkg/gui/undoing.go +++ b/pkg/gui/undoing.go @@ -88,7 +88,7 @@ func (gui *Gui) reflogUndo(g *gocui.Gui, v *gocui.View) error { undoingStatus := gui.Tr.SLocalize("UndoingStatus") if gui.workingTreeState() == "rebasing" { - return gui.createErrorPanel(gui.g, gui.Tr.SLocalize("cantUndoWhileRebasing")) + return gui.createErrorPanel(gui.Tr.SLocalize("cantUndoWhileRebasing")) } return gui.parseReflogForActions(func(counter int, action reflogAction) (bool, error) { @@ -119,7 +119,7 @@ func (gui *Gui) reflogRedo(g *gocui.Gui, v *gocui.View) error { redoingStatus := gui.Tr.SLocalize("RedoingStatus") if gui.workingTreeState() == "rebasing" { - return gui.createErrorPanel(gui.g, gui.Tr.SLocalize("cantRedoWhileRebasing")) + return gui.createErrorPanel(gui.Tr.SLocalize("cantRedoWhileRebasing")) } return gui.parseReflogForActions(func(counter int, action reflogAction) (bool, error) { @@ -166,7 +166,7 @@ func (gui *Gui) handleHardResetWithAutoStash(commitSha string, options handleHar reset := func() error { if err := gui.resetToRef(commitSha, "hard", commands.RunCommandOptions{EnvVars: options.EnvVars}); err != nil { - return gui.createErrorPanel(gui.g, err.Error()) + return gui.surfaceError(err) } return nil } @@ -176,7 +176,7 @@ func (gui *Gui) handleHardResetWithAutoStash(commitSha string, options handleHar return gui.createConfirmationPanel(gui.g, gui.getBranchesView(), true, gui.Tr.SLocalize("AutoStashTitle"), gui.Tr.SLocalize("AutoStashPrompt"), func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(options.WaitingStatus, func() error { if err := gui.GitCommand.StashSave(gui.Tr.SLocalize("StashPrefix") + commitSha); err != nil { - return gui.createErrorPanel(g, err.Error()) + return gui.surfaceError(err) } if err := reset(); err != nil { return err @@ -186,7 +186,7 @@ func (gui *Gui) handleHardResetWithAutoStash(commitSha string, options handleHar if err := gui.refreshSidePanels(refreshOptions{}); err != nil { return err } - return gui.createErrorPanel(g, err.Error()) + return gui.surfaceError(err) } return nil }) |