diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-03-11 09:53:46 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-03-16 10:20:27 +1100 |
commit | 0e008cc15f8e7cbb6869151d48ae30403bf4dc70 (patch) | |
tree | 16af0e998aeaa7e16477e2817376fd0ef38e2219 /pkg/gui/keybindings.go | |
parent | 1ad9c6faac18d5a683d631452e6a8f8f9c88b9da (diff) |
allow user to checkout old files
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r-- | pkg/gui/keybindings.go | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 4f03a3c47..c5eb758e9 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -453,6 +453,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Modifier: gocui.ModNone, Handler: gui.handleSwitchToCommitsPanel, Description: gui.Tr.SLocalize("goBack"), + }, { + ViewName: "commitFiles", + Key: 'c', + Modifier: gocui.ModNone, + Handler: gui.handleCheckoutCommitFile, + Description: gui.Tr.SLocalize("checkoutCommitFile"), }, } @@ -471,12 +477,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { nextLine func(*gocui.Gui, *gocui.View) error focus func(*gocui.Gui, *gocui.View) error }{ - "menu": {prevLine: gui.handleMenuPrevLine, nextLine: gui.handleMenuNextLine, focus: gui.handleMenuSelect}, - "files": {prevLine: gui.handleFilesPrevLine, nextLine: gui.handleFilesNextLine, focus: gui.handleFilesFocus}, - "branches": {prevLine: gui.handleBranchesPrevLine, nextLine: gui.handleBranchesNextLine, focus: gui.handleBranchSelect}, - "commits": {prevLine: gui.handleCommitsPrevLine, nextLine: gui.handleCommitsNextLine, focus: gui.handleCommitSelect}, - "stash": {prevLine: gui.handleStashPrevLine, nextLine: gui.handleStashNextLine, focus: gui.handleStashEntrySelect}, - "status": {focus: gui.handleStatusSelect}, + "menu": {prevLine: gui.handleMenuPrevLine, nextLine: gui.handleMenuNextLine, focus: gui.handleMenuSelect}, + "files": {prevLine: gui.handleFilesPrevLine, nextLine: gui.handleFilesNextLine, focus: gui.handleFilesFocus}, + "branches": {prevLine: gui.handleBranchesPrevLine, nextLine: gui.handleBranchesNextLine, focus: gui.handleBranchSelect}, + "commits": {prevLine: gui.handleCommitsPrevLine, nextLine: gui.handleCommitsNextLine, focus: gui.handleCommitSelect}, + "stash": {prevLine: gui.handleStashPrevLine, nextLine: gui.handleStashNextLine, focus: gui.handleStashEntrySelect}, + "status": {focus: gui.handleStatusSelect}, "commitFiles": {prevLine: gui.handleCommitFilesPrevLine, nextLine: gui.handleCommitFilesNextLine, focus: gui.handleCommitFileSelect}, } |