allowing commit files to be viewed in reflog as well

This commit is contained in:
Jesse Duffield
2020-08-21 09:12:45 +10:00
parent 48f1adad49
commit ddf25e14af
9 changed files with 90 additions and 39 deletions

View File

@@ -42,6 +42,12 @@ func (gui *Gui) handleTopLevelReturn(g *gocui.Gui, v *gocui.View) error {
return gui.exitFilterMode()
}
currentContext := gui.currentContext()
if currentContext != nil && currentContext.GetParentContext() != nil {
// TODO: think about whether this should be marked as a return rather than adding to the stack
gui.switchContext(currentContext.GetParentContext())
}
if gui.Config.GetUserConfig().GetBool("quitOnTopLevelReturn") {
return gui.handleQuit()
}