mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
refactor how we handle different modes
This commit is contained in:
@ -758,7 +758,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
ViewName: "commits",
|
||||
Contexts: []string{BRANCH_COMMITS_CONTEXT_KEY},
|
||||
Key: gui.getKey("commits.cherryPickCopy"),
|
||||
Handler: gui.handleCopyCommit,
|
||||
Handler: gui.wrappedHandler(gui.handleCopyCommit),
|
||||
Description: gui.Tr.SLocalize("cherryPickCopy"),
|
||||
},
|
||||
{
|
||||
@ -772,14 +772,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
ViewName: "commits",
|
||||
Contexts: []string{BRANCH_COMMITS_CONTEXT_KEY},
|
||||
Key: gui.getKey("commits.cherryPickCopyRange"),
|
||||
Handler: gui.handleCopyCommitRange,
|
||||
Handler: gui.wrappedHandler(gui.handleCopyCommitRange),
|
||||
Description: gui.Tr.SLocalize("cherryPickCopyRange"),
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{BRANCH_COMMITS_CONTEXT_KEY},
|
||||
Key: gui.getKey("commits.pasteCommits"),
|
||||
Handler: gui.HandlePasteCommits,
|
||||
Handler: gui.wrappedHandler(gui.HandlePasteCommits),
|
||||
Description: gui.Tr.SLocalize("pasteCommits"),
|
||||
},
|
||||
{
|
||||
@ -867,6 +867,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
Handler: gui.wrappedHandler(gui.handleNewBranchOffCurrentItem),
|
||||
Description: gui.Tr.SLocalize("newBranch"),
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{SUB_COMMITS_CONTEXT_KEY},
|
||||
Key: gui.getKey("commits.cherryPickCopy"),
|
||||
Handler: gui.wrappedHandler(gui.handleCopyCommit),
|
||||
Description: gui.Tr.SLocalize("cherryPickCopy"),
|
||||
},
|
||||
{
|
||||
ViewName: "stash",
|
||||
Key: gui.getKey("universal.goInto"),
|
||||
|
Reference in New Issue
Block a user