summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_options_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-03-27 17:19:31 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-27 18:16:16 +1100
commit3e5d4b2c749322351c781c4427852ff4393fcd4f (patch)
tree87958b5eece97e30cc32620a0a52d038aafc6216 /pkg/gui/patch_options_panel.go
parente94312b664c3e8daa0a27d6c48fda2d137fe98ac (diff)
add menu keybindings for various things
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r--pkg/gui/patch_options_panel.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go
index 439b726cb..d8ac509ac 100644
--- a/pkg/gui/patch_options_panel.go
+++ b/pkg/gui/patch_options_panel.go
@@ -17,14 +17,17 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
{
DisplayString: "reset patch",
OnPress: gui.handleResetPatch,
+ Key: 'c',
},
{
DisplayString: "apply patch",
OnPress: func() error { return gui.handleApplyPatch(false) },
+ Key: 'a',
},
{
DisplayString: "apply patch in reverse",
OnPress: func() error { return gui.handleApplyPatch(true) },
+ Key: 'r',
},
}
@@ -33,14 +36,17 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
{
DisplayString: fmt.Sprintf("remove patch from original commit (%s)", gui.git.Patch.PatchManager.To),
OnPress: gui.handleDeletePatchFromCommit,
+ Key: 'd',
},
{
DisplayString: "move patch out into index",
OnPress: gui.handleMovePatchIntoWorkingTree,
+ Key: 'i',
},
{
DisplayString: "move patch into new commit",
OnPress: gui.handlePullPatchIntoNewCommit,
+ Key: 'n',
},
}...)
@@ -55,6 +61,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
{
DisplayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha),
OnPress: gui.handleMovePatchToSelectedCommit,
+ Key: 'm',
},
}, menuItems[1:]...,
)...,