diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 20:51:39 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 3f7136fc7dd231a96be051c4887bc75bfbf08de4 (patch) | |
tree | d683b91dc6c5d1d49a50d2621bbcea6ee087be34 /pkg/gui/patch_options_panel.go | |
parent | 59f5f5c1af4ab52f91d8bc6538fb460a21e880a8 (diff) |
missed a spot
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r-- | pkg/gui/patch_options_panel.go | 30 |
1 files 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}) |