diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 19:28:59 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 19:28:59 +1000 |
commit | d2d88fe64e1fb3b831b283c56294271323bcade1 (patch) | |
tree | 677b9cc9715cf458cef8f0ab5d6569e4b9a9461e /pkg/gui | |
parent | fa2a385a0c75e8d9cfebdf67f728aed206fecfcf (diff) |
fix focus change on merge popup return
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/merge_panel.go | 12 | ||||
-rw-r--r-- | pkg/gui/rebase_options_panel.go | 11 |
2 files changed, 18 insertions, 5 deletions
diff --git a/pkg/gui/merge_panel.go b/pkg/gui/merge_panel.go index aa4dbe00d..c19987585 100644 --- a/pkg/gui/merge_panel.go +++ b/pkg/gui/merge_panel.go @@ -341,11 +341,19 @@ func (gui *Gui) promptToContinue() error { gui.takeOverScrolling() return gui.ask(askOpts{ - title: "continue", - prompt: gui.Tr.SLocalize("ConflictsResolved"), + title: "continue", + prompt: gui.Tr.SLocalize("ConflictsResolved"), + handlersManageFocus: true, handleConfirm: func() error { + if err := gui.switchContext(gui.Contexts.Files.Context); err != nil { + return err + } + return gui.genericMergeCommand("continue") }, + handleClose: func() error { + return gui.switchContext(gui.Contexts.Files.Context) + }, }) } diff --git a/pkg/gui/rebase_options_panel.go b/pkg/gui/rebase_options_panel.go index 656ef0bbc..9b11dccb1 100644 --- a/pkg/gui/rebase_options_panel.go +++ b/pkg/gui/rebase_options_panel.go @@ -77,12 +77,17 @@ func (gui *Gui) handleGenericMergeCommandResult(result error) error { return nil } else if strings.Contains(result.Error(), "When you have resolved this problem") || strings.Contains(result.Error(), "fix conflicts") || strings.Contains(result.Error(), "Resolve all conflicts manually") { return gui.ask(askOpts{ - title: gui.Tr.SLocalize("FoundConflictsTitle"), - prompt: gui.Tr.SLocalize("FoundConflicts"), + title: gui.Tr.SLocalize("FoundConflictsTitle"), + prompt: gui.Tr.SLocalize("FoundConflicts"), + handlersManageFocus: true, handleConfirm: func() error { - return nil + return gui.switchContext(gui.Contexts.Files.Context) }, handleClose: func() error { + if err := gui.returnFromContext(); err != nil { + return err + } + return gui.genericMergeCommand("abort") }, }) |