diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-18 07:54:42 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-18 07:58:16 +1000 |
commit | 14c8b80494a87b65580cff61d4af5f0c1bd33614 (patch) | |
tree | 5c4a5a5abea5e9bc4eac61477cbc66f5dfddd97e /pkg/gui/files_panel.go | |
parent | 10dde518bc3951b54a3f1099f765177246b4af17 (diff) |
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 2f44e566f..c2ec97e3b 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -332,15 +332,17 @@ func (gui *Gui) handleAmendCommitPress() error { title: strings.Title(gui.Tr.SLocalize("AmendLastCommit")), prompt: gui.Tr.SLocalize("SureToAmend"), handleConfirm: func() error { - ok, err := gui.runSyncOrAsyncCommand(gui.GitCommand.AmendHead()) - if err != nil { - return err - } - if !ok { - return nil - } + return gui.WithWaitingStatus(gui.Tr.SLocalize("AmendingStatus"), func() error { + ok, err := gui.runSyncOrAsyncCommand(gui.GitCommand.AmendHead()) + if err != nil { + return err + } + if !ok { + return nil + } - return gui.refreshSidePanels(refreshOptions{mode: ASYNC}) + return gui.refreshSidePanels(refreshOptions{mode: ASYNC}) + }) }, }) } |