diff options
author | matejcik <ja@matejcik.cz> | 2020-01-03 13:01:32 +0100 |
---|---|---|
committer | Dawid Dziurla <dawidd0811@gmail.com> | 2020-01-03 15:09:59 +0100 |
commit | 0a31edecb66c1b00051f9d601c589d737cc62505 (patch) | |
tree | 778ad75a1e01c7805a9ee4662d97acd75cc93360 | |
parent | 6ac6d142c0d32820ca6b04e4a8db191613fcbc95 (diff) |
make Ctrl+P visible
-rw-r--r-- | docs/keybindings/Keybindings_en.md | 1 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 16 | ||||
-rw-r--r-- | pkg/i18n/english.go | 3 |
3 files changed, 14 insertions, 6 deletions
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 1ad719251..e9c6faf59 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -4,6 +4,7 @@ <pre> <kbd>m</kbd>: view merge/rebase options + <kbd>ctrl+p</kbd>: view custom patch options <kbd>P</kbd>: push <kbd>p</kbd>: pull <kbd>R</kbd>: refresh diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index ae0f8f8ad..8d036fc07 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -36,6 +36,9 @@ func (b *Binding) GetKey() string { if b.Key.(gocui.Key) == gocui.KeyCtrlK { return "ctrl+k" } + if b.Key.(gocui.Key) == gocui.KeyCtrlP { + return "ctrl+p" + } key = int(b.Key.(gocui.Key)) } @@ -140,6 +143,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { }, { ViewName: "", + Key: gocui.KeyCtrlP, + Modifier: gocui.ModNone, + Handler: gui.handleCreatePatchOptionsMenu, + Description: gui.Tr.SLocalize("ViewPatchOptions"), + }, + { + ViewName: "", Key: 'P', Modifier: gocui.ModNone, Handler: gui.pushFiles, @@ -178,12 +188,6 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Handler: gui.handleCreateOptionsMenu, }, { - ViewName: "", - Key: gocui.KeyCtrlP, - Modifier: gocui.ModNone, - Handler: gui.handleCreatePatchOptionsMenu, - }, - { ViewName: "status", Key: 'e', Modifier: gocui.ModNone, diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 849594872..55a607090 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -823,6 +823,9 @@ func addEnglish(i18nObject *i18n.Bundle) error { ID: "toggleAddToPatch", Other: "toggle file included in patch", }, &i18n.Message{ + ID: "ViewPatchOptions", + Other: "view custom patch options", + }, &i18n.Message{ ID: "PatchOptionsTitle", Other: "Patch Options", }, &i18n.Message{ |