summaryrefslogtreecommitdiffstats
path: root/pkg/gui/keybindings.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-12-05 19:33:46 +1100
committerJesse Duffield <jessedduffield@gmail.com>2018-12-05 19:33:46 +1100
commitc0f9795910dd840fb83e6992f7f59c77ec4c13fc (patch)
tree05fe245b822008f458025a5dd75cae384bfda845 /pkg/gui/keybindings.go
parent658e5a9faf8409c62f11f3ad6d636d0255e450f4 (diff)
staging lines and hunks
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r--pkg/gui/keybindings.go55
1 files changed, 47 insertions, 8 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 2c47ab4f3..4158bedb7 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -392,25 +392,64 @@ func (gui *Gui) GetKeybindings() []*Binding {
Modifier: gocui.ModNone,
Handler: gui.handleMenuClose,
}, {
- ViewName: "staging",
- Key: gocui.KeyEsc,
- Modifier: gocui.ModNone,
- Handler: gui.handleStagingEscape,
+ ViewName: "staging",
+ Key: gocui.KeyEsc,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingEscape,
+ KeyReadable: "esc",
+ Description: gui.Tr.SLocalize("EscapeStaging"),
}, {
ViewName: "staging",
Key: gocui.KeyArrowUp,
Modifier: gocui.ModNone,
- Handler: gui.handleStagingKeyUp,
+ Handler: gui.handleStagingPrevLine,
}, {
ViewName: "staging",
Key: gocui.KeyArrowDown,
Modifier: gocui.ModNone,
- Handler: gui.handleStagingKeyDown,
+ Handler: gui.handleStagingNextLine,
}, {
ViewName: "staging",
- Key: gocui.KeySpace,
+ Key: 'k',
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingPrevLine,
+ }, {
+ ViewName: "staging",
+ Key: 'j',
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingNextLine,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeyArrowLeft,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingPrevHunk,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeyArrowRight,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingNextHunk,
+ }, {
+ ViewName: "staging",
+ Key: 'h',
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingPrevHunk,
+ }, {
+ ViewName: "staging",
+ Key: 'l',
Modifier: gocui.ModNone,
- Handler: gui.handleStageLine,
+ Handler: gui.handleStagingNextHunk,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeySpace,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStageLine,
+ Description: gui.Tr.SLocalize("StageLine"),
+ }, {
+ ViewName: "staging",
+ Key: 'a',
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStageHunk,
+ Description: gui.Tr.SLocalize("StageHunk"),
},
}