From 59d61f00a66ca465d0958dfa6b54f711bed7d885 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Aug 2020 13:49:05 +1000 Subject: hide secondary view when escaping patch building panel --- pkg/gui/patch_building_panel.go | 5 +++-- 1 file 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 { -- cgit v1.2.3