fix focus change on merge popup return

This commit is contained in:
Jesse Duffield 2020-08-23 19:28:59 +10:00
parent fa2a385a0c
commit d2d88fe64e
2 changed files with 18 additions and 5 deletions

View file

@ -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)
},
})
}

View file

@ -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")
},
})