diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-22 11:57:44 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 442f6cd854d972c3797ca203c8de6943fe81d2ca (patch) | |
tree | bd4b60dce12233f2bc15111efd7c473b58005b39 /pkg/gui/keybindings.go | |
parent | c2b154acad4e1040bdc0e09cf44733ccd877923b (diff) |
more cherry picking stuff, mostly around the reflog
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r-- | pkg/gui/keybindings.go | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index f9d6a777f..9e377690c 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -815,7 +815,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { ViewName: "commits", Contexts: []string{BRANCH_COMMITS_CONTEXT_KEY}, Key: gui.getKey("commits.resetCherryPick"), - Handler: gui.handleResetCherryPick, + Handler: gui.wrappedHandler(gui.exitCherryPickingMode), Description: gui.Tr.SLocalize("resetCherryPick"), }, { @@ -840,6 +840,27 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Description: gui.Tr.SLocalize("viewResetOptions"), }, { + ViewName: "commits", + Contexts: []string{REFLOG_COMMITS_CONTEXT_KEY}, + Key: gui.getKey("commits.cherryPickCopy"), + Handler: gui.wrappedHandler(gui.handleCopyCommit), + Description: gui.Tr.SLocalize("cherryPickCopy"), + }, + { + ViewName: "commits", + Contexts: []string{REFLOG_COMMITS_CONTEXT_KEY}, + Key: gui.getKey("commits.cherryPickCopyRange"), + Handler: gui.wrappedHandler(gui.handleCopyCommitRange), + Description: gui.Tr.SLocalize("cherryPickCopyRange"), + }, + { + ViewName: "commits", + Contexts: []string{REFLOG_COMMITS_CONTEXT_KEY}, + Key: gui.getKey("commits.resetCherryPick"), + Handler: gui.wrappedHandler(gui.exitCherryPickingMode), + Description: gui.Tr.SLocalize("resetCherryPick"), + }, + { ViewName: "branches", Contexts: []string{SUB_COMMITS_CONTEXT_KEY}, Key: gui.getKey("universal.goInto"), @@ -875,6 +896,20 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Description: gui.Tr.SLocalize("cherryPickCopy"), }, { + ViewName: "branches", + Contexts: []string{SUB_COMMITS_CONTEXT_KEY}, + Key: gui.getKey("commits.cherryPickCopyRange"), + Handler: gui.wrappedHandler(gui.handleCopyCommitRange), + Description: gui.Tr.SLocalize("cherryPickCopyRange"), + }, + { + ViewName: "branches", + Contexts: []string{SUB_COMMITS_CONTEXT_KEY}, + Key: gui.getKey("commits.resetCherryPick"), + Handler: gui.wrappedHandler(gui.exitCherryPickingMode), + Description: gui.Tr.SLocalize("resetCherryPick"), + }, + { ViewName: "stash", Key: gui.getKey("universal.goInto"), Handler: gui.wrappedHandler(gui.handleViewStashFiles), |