summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_options_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-21 20:51:39 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit3f7136fc7dd231a96be051c4887bc75bfbf08de4 (patch)
treed683b91dc6c5d1d49a50d2621bbcea6ee087be34 /pkg/gui/patch_options_panel.go
parent59f5f5c1af4ab52f91d8bc6538fb460a21e880a8 (diff)
missed a spot
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r--pkg/gui/patch_options_panel.go30
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})