diff options
author | skanehira <sho19921005@gmail.com> | 2019-03-09 23:42:10 +0900 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-03-16 10:20:27 +1100 |
commit | 06fe726ee79d3993d936ae3e064761273b657ae8 (patch) | |
tree | 1da4c337f9e506944f762c09ba930451c5c823b4 /pkg/gui/keybindings.go | |
parent | 1b6e46973ebfdb6ba873fac6a2ce05bb1f8db8c1 (diff) |
Add feature of display committed file list #383
Diffstat (limited to 'pkg/gui/keybindings.go')
-rw-r--r-- | pkg/gui/keybindings.go | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index eb3e765c4..4fdc3d969 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -389,6 +389,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Handler: gui.HandlePasteCommits, Description: gui.Tr.SLocalize("pasteCommits"), }, { + ViewName: "commits", + Key: gocui.KeyEnter, + Modifier: gocui.ModNone, + Handler: gui.handleSwitchToCommitFilesPanel, + Description: gui.Tr.SLocalize("CommitFiles"), + }, { ViewName: "stash", Key: gocui.KeySpace, Modifier: gocui.ModNone, @@ -441,6 +447,12 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Key: gocui.MouseLeft, Modifier: gocui.ModNone, Handler: gui.handleDonate, + }, { + ViewName: "commit files", + Key: gocui.KeyEsc, + Modifier: gocui.ModNone, + Handler: gui.handleSwitchToCommitsPanel, + Description: gui.Tr.SLocalize("CommitsTitle"), }, } @@ -459,12 +471,13 @@ 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}, + "commit files": {prevLine: gui.handleCommitFilesPrevLine, nextLine: gui.handleCommitFilesNextLine}, } for viewName, functions := range listPanelMap { |