diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 09:12:45 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | ddf25e14afe5ddfc2527149c54ea55ea2e83610a (patch) | |
tree | a75ce97a36ce9ec3e4215c20e2a26e82fea81304 /pkg/gui/quitting.go | |
parent | 48f1adad49c01cf7f093e8f9921582690bef55a7 (diff) |
allowing commit files to be viewed in reflog as well
Diffstat (limited to 'pkg/gui/quitting.go')
-rw-r--r-- | pkg/gui/quitting.go | 6 |
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() } |