1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-01 00:54:58 +02:00

missed a spot

This commit is contained in:
Jesse Duffield
2020-08-21 20:51:39 +10:00
parent 59f5f5c1af
commit 3f7136fc7d

View File

@ -45,22 +45,22 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error
onPress: gui.handlePullPatchIntoNewCommit, onPress: gui.handlePullPatchIntoNewCommit,
}, },
}...) }...)
}
selectedCommit := gui.getSelectedCommit() selectedCommit := gui.getSelectedCommit()
if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha { if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha {
// adding this option to index 1 // adding this option to index 1
menuItems = append( menuItems = append(
menuItems[:1], menuItems[:1],
append( append(
[]*menuItem{ []*menuItem{
{ {
displayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha), displayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha),
onPress: gui.handleMovePatchToSelectedCommit, onPress: gui.handleMovePatchToSelectedCommit,
}, },
}, menuItems[1:]..., }, menuItems[1:]...,
)..., )...,
) )
}
} }
return gui.createMenu(gui.Tr.SLocalize("PatchOptionsTitle"), menuItems, createMenuOptions{showCancel: true}) return gui.createMenu(gui.Tr.SLocalize("PatchOptionsTitle"), menuItems, createMenuOptions{showCancel: true})