diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 10:13:56 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | ade54b38c12079ba133e9c8810af2a3760afb0f3 (patch) | |
tree | 791315bd05894635ac0dee3f0e6b9c1acbea8f90 /pkg/gui/patch_options_panel.go | |
parent | 0dd2c869a8808e937c69f8ce0ba04015e5a9075e (diff) |
cleanup
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r-- | pkg/gui/patch_options_panel.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index 20b008459..1eb6cffa7 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -42,7 +42,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error }, }...) - if gui.currentContext() == gui.Contexts.BranchCommits.Context { + if gui.currentContext().GetKey() == gui.Contexts.BranchCommits.Context.GetKey() { selectedCommit := gui.getSelectedLocalCommit() if selectedCommit != nil && gui.GitCommand.PatchManager.To != selectedCommit.Sha { // adding this option to index 1 @@ -84,7 +84,7 @@ func (gui *Gui) validateNormalWorkingTreeState() (bool, error) { } func (gui *Gui) returnFocusFromLineByLinePanelIfNecessary() error { - if gui.State.MainContext == "patchBuilding" { + if gui.State.MainContext == MAIN_PATCH_BUILDING_CONTEXT_KEY { return gui.handleEscapePatchBuildingPanel() } return nil |