summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-23 13:49:05 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit59d61f00a66ca465d0958dfa6b54f711bed7d885 (patch)
tree93d350404ad3b2eb7ac309e7b4b7b2a46c01b74b
parent262ff24c5bccd02f18f6ac058de44e24cca00d0a (diff)
hide secondary view when escaping patch building panel
-rw-r--r--pkg/gui/patch_building_panel.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go
index 984ac80ce..7f741a7b0 100644
--- a/pkg/gui/patch_building_panel.go
+++ b/pkg/gui/patch_building_panel.go
@@ -102,9 +102,10 @@ func (gui *Gui) handleEscapePatchBuildingPanel() error {
if gui.currentContext().GetKey() == gui.Contexts.PatchBuilding.Context.GetKey() {
return gui.switchContext(gui.Contexts.CommitFiles.Context)
+ } else {
+ // need to re-focus in case the secondary view should now be hidden
+ return gui.currentContext().HandleFocus()
}
-
- return nil
}
func (gui *Gui) secondaryPatchPanelUpdateOpts() *viewUpdateOpts {