1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-06 08:59:31 +02:00

make Ctrl+P visible

This commit is contained in:
matejcik
2020-01-03 13:01:32 +01:00
committed by Dawid Dziurla
parent 6ac6d142c0
commit 0a31edecb6
3 changed files with 14 additions and 6 deletions

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",