diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 21:08:06 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 4080e9b501137543ea4234be285b51fe9b29cf6b (patch) | |
tree | 564b5e9fa91a13fad92bf53f73a51759b9756568 /pkg/gui/patch_building_panel.go | |
parent | 53da858c0681654d37c5c7f9232a54a3ee9f6892 (diff) |
only return focus if we already have it
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r-- | pkg/gui/patch_building_panel.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index c39568cdf..d7be86857 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -82,7 +82,11 @@ func (gui *Gui) handleEscapePatchBuildingPanel() error { gui.GitCommand.PatchManager.Reset() } - return gui.switchContext(gui.Contexts.CommitFiles.Context) + if gui.currentContext().GetKey() == gui.Contexts.PatchBuilding.Context.GetKey() { + return gui.switchContext(gui.Contexts.CommitFiles.Context) + } + + return nil } func (gui *Gui) refreshSecondaryPatchPanel() error { |