summaryrefslogtreecommitdiffstats
path: root/pkg/gui/keybindings.go
diff options
context:
space:
mode:
authorKristijan Husak <husakkristijan@gmail.com>2018-09-12 15:20:35 +0200
committerKristijan Husak <husakkristijan@gmail.com>2018-09-13 12:44:32 +0200
commit61f0801bd366e959437676ae72b2d9fe98c4b8af (patch)
tree083ef07b6c8f759c2432a6e4b53df940441abf6f /pkg/gui/keybindings.go
parent7fb2cafd0cf6effbe660a933612d8c6783206749 (diff)
Add ammend commit action.
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r--pkg/gui/keybindings.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index c8ed7d3c8..3eb8785d2 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -1,6 +1,7 @@
package gui
import "github.com/jesseduffield/gocui"
+import "strings"
// Binding - a keybinding mapping a key and modifier to a handler. The keypress
// is only handled if the given view has focus, or handled globally if the view
@@ -100,6 +101,12 @@ func (gui *Gui) GetKeybindings() []Binding {
Description: gui.Tr.SLocalize("CommitChanges"),
}, {
ViewName: "files",
+ Key: 'M',
+ Modifier: gocui.ModNone,
+ Handler: gui.handleAmendCommitPress,
+ Description: strings.ToLower(gui.Tr.SLocalize("AmendLastCommit")),
+ }, {
+ ViewName: "files",
Key: 'C',
Modifier: gocui.ModNone,
Handler: gui.handleCommitEditorPress,