summaryrefslogtreecommitdiffstats
path: root/pkg/gui/quitting.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-21 09:12:45 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commitddf25e14afe5ddfc2527149c54ea55ea2e83610a (patch)
treea75ce97a36ce9ec3e4215c20e2a26e82fea81304 /pkg/gui/quitting.go
parent48f1adad49c01cf7f093e8f9921582690bef55a7 (diff)
allowing commit files to be viewed in reflog as well
Diffstat (limited to 'pkg/gui/quitting.go')
-rw-r--r--pkg/gui/quitting.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/quitting.go b/pkg/gui/quitting.go
index b39f3bcb8..107538a39 100644
--- a/pkg/gui/quitting.go
+++ b/pkg/gui/quitting.go
@@ -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()
}