1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-06 03:53:59 +02:00

Merge pull request #572 from matejcik/master

make Ctrl+P visible
This commit is contained in:
Dawid Dziurla 2020-01-03 15:13:48 +01:00 committed by GitHub
commit 96ca7262e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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))
}
@ -138,6 +141,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.handleCreateRebaseOptionsMenu,
Description: gui.Tr.SLocalize("ViewMergeRebaseOptions"),
},
{
ViewName: "",
Key: gocui.KeyCtrlP,
Modifier: gocui.ModNone,
Handler: gui.handleCreatePatchOptionsMenu,
Description: gui.Tr.SLocalize("ViewPatchOptions"),
},
{
ViewName: "",
Key: 'P',
@ -177,12 +187,6 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Modifier: gocui.ModNone,
Handler: gui.handleCreateOptionsMenu,
},
{
ViewName: "",
Key: gocui.KeyCtrlP,
Modifier: gocui.ModNone,
Handler: gui.handleCreatePatchOptionsMenu,
},
{
ViewName: "status",
Key: 'e',

View File

@ -822,6 +822,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "toggleAddToPatch",
Other: "toggle file included in patch",
}, &i18n.Message{
ID: "ViewPatchOptions",
Other: "view custom patch options",
}, &i18n.Message{
ID: "PatchOptionsTitle",
Other: "Patch Options",