mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +02:00
more
This commit is contained in:
parent
3f7136fc7d
commit
f3c87bde88
@ -46,20 +46,22 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error
|
|||||||
},
|
},
|
||||||
}...)
|
}...)
|
||||||
|
|
||||||
selectedCommit := gui.getSelectedCommit()
|
if gui.currentContext() == gui.Contexts.BranchCommits.Context {
|
||||||
if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha {
|
selectedCommit := gui.getSelectedCommit()
|
||||||
// adding this option to index 1
|
if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha {
|
||||||
menuItems = append(
|
// adding this option to index 1
|
||||||
menuItems[:1],
|
menuItems = append(
|
||||||
append(
|
menuItems[:1],
|
||||||
[]*menuItem{
|
append(
|
||||||
{
|
[]*menuItem{
|
||||||
displayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha),
|
{
|
||||||
onPress: gui.handleMovePatchToSelectedCommit,
|
displayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha),
|
||||||
},
|
onPress: gui.handleMovePatchToSelectedCommit,
|
||||||
}, menuItems[1:]...,
|
},
|
||||||
)...,
|
}, menuItems[1:]...,
|
||||||
)
|
)...,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user