From 3f7136fc7dd231a96be051c4887bc75bfbf08de4 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 21 Aug 2020 20:51:39 +1000 Subject: [PATCH] missed a spot --- pkg/gui/patch_options_panel.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go index 2ebbf7b24..7d71e1fb2 100644 --- a/pkg/gui/patch_options_panel.go +++ b/pkg/gui/patch_options_panel.go @@ -45,22 +45,22 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error onPress: gui.handlePullPatchIntoNewCommit, }, }...) - } - selectedCommit := gui.getSelectedCommit() - if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha { - // adding this option to index 1 - menuItems = append( - menuItems[:1], - append( - []*menuItem{ - { - displayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha), - onPress: gui.handleMovePatchToSelectedCommit, - }, - }, menuItems[1:]..., - )..., - ) + selectedCommit := gui.getSelectedCommit() + if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha { + // adding this option to index 1 + menuItems = append( + menuItems[:1], + append( + []*menuItem{ + { + displayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha), + onPress: gui.handleMovePatchToSelectedCommit, + }, + }, menuItems[1:]..., + )..., + ) + } } return gui.createMenu(gui.Tr.SLocalize("PatchOptionsTitle"), menuItems, createMenuOptions{showCancel: true})