mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-30 09:16:47 +02:00
allow resetting cherry picked commits selection
This commit is contained in:
parent
dadb646252
commit
8fbcc36331
@ -128,6 +128,7 @@ Default path for the config file:
|
||||
tagCommit: 'T'
|
||||
toggleDiffCommit: 'i'
|
||||
checkoutCommit: '<space>'
|
||||
resetCherryPick: '<c-R>'
|
||||
stash:
|
||||
popStash: 'g'
|
||||
commitFiles:
|
||||
|
@ -360,6 +360,7 @@ keybinding:
|
||||
tagCommit: 'T'
|
||||
toggleDiffCommit: 'i'
|
||||
checkoutCommit: '<space>'
|
||||
resetCherryPick: '<c-R>'
|
||||
stash:
|
||||
popStash: 'g'
|
||||
commitFiles:
|
||||
|
@ -642,3 +642,8 @@ func (gui *Gui) handleOpenSearchForCommitsPanel(g *gocui.Gui, v *gocui.View) err
|
||||
|
||||
return gui.handleOpenSearch(gui.g, v)
|
||||
}
|
||||
|
||||
func (gui *Gui) handleResetCherryPick(g *gocui.Gui, v *gocui.View) error {
|
||||
gui.State.CherryPickedCommits = []*commands.Commit{}
|
||||
return gui.refreshCommits(gui.g)
|
||||
}
|
||||
|
@ -840,6 +840,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
Handler: gui.handleTagCommit,
|
||||
Description: gui.Tr.SLocalize("tagCommit"),
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"branch-commits"},
|
||||
Key: gui.getKey("commits.resetCherryPick"),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.handleResetCherryPick,
|
||||
Description: gui.Tr.SLocalize("resetCherryPick"),
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"reflog-commits"},
|
||||
|
@ -1032,6 +1032,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
||||
}, &i18n.Message{
|
||||
ID: "closeMenu",
|
||||
Other: "close menu",
|
||||
}, &i18n.Message{
|
||||
ID: "resetCherryPick",
|
||||
Other: "reset cherry-picked (copied) commits selection",
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user