summaryrefslogtreecommitdiffstats
path: root/pkg/gui/keybindings.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-12-02 19:57:01 +1100
committerJesse Duffield <jessedduffield@gmail.com>2018-12-04 22:11:48 +1100
commit658e5a9faf8409c62f11f3ad6d636d0255e450f4 (patch)
tree5914a060bfdaaf28064326e66f9a207e2dd8dd0c /pkg/gui/keybindings.go
parent99824c8a7b840cc2fa8c06f248acfaf01a3f964b (diff)
initial support for staging individual lines
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r--pkg/gui/keybindings.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 1b656659d..2c47ab4f3 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -213,6 +213,13 @@ func (gui *Gui) GetKeybindings() []*Binding {
Handler: gui.handleResetHard,
Description: gui.Tr.SLocalize("resetHard"),
}, {
+ ViewName: "files",
+ Key: gocui.KeyEnter,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleSwitchToStagingPanel,
+ Description: gui.Tr.SLocalize("StageLines"),
+ KeyReadable: "enter",
+ }, {
ViewName: "main",
Key: gocui.KeyEsc,
Modifier: gocui.ModNone,
@@ -384,6 +391,26 @@ func (gui *Gui) GetKeybindings() []*Binding {
Key: 'q',
Modifier: gocui.ModNone,
Handler: gui.handleMenuClose,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeyEsc,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingEscape,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeyArrowUp,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingKeyUp,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeyArrowDown,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStagingKeyDown,
+ }, {
+ ViewName: "staging",
+ Key: gocui.KeySpace,
+ Modifier: gocui.ModNone,
+ Handler: gui.handleStageLine,
},
}