1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-27 12:32:37 +02:00

fix display of menu option keybindings

This commit is contained in:
David Chen 2020-01-07 13:26:29 -08:00
parent de2cfc7e17
commit 3e875cc593
2 changed files with 8 additions and 8 deletions

View File

@ -743,11 +743,11 @@ func (gui *Gui) renderAppStatus() error {
func (gui *Gui) renderGlobalOptions() error { func (gui *Gui) renderGlobalOptions() error {
return gui.renderOptionsMap(map[string]string{ return gui.renderOptionsMap(map[string]string{
"PgUp/PgDn": gui.Tr.SLocalize("scroll"), fmt.Sprintf("%s/%s", gui.getKeyDisplay("universal.scrollUpMain"), gui.getKeyDisplay("universal.scrollDownMain")): gui.Tr.SLocalize("scroll"),
"← → ↑ ↓": gui.Tr.SLocalize("navigate"), fmt.Sprintf("%s %s %s %s", gui.getKeyDisplay("universal.prevBlock"), gui.getKeyDisplay("universal.nextBlock"), gui.getKeyDisplay("universal.prevItem"), gui.getKeyDisplay("universal.nextItem")): gui.Tr.SLocalize("navigate"),
"esc/q": gui.Tr.SLocalize("close"), fmt.Sprintf("%s/%s", gui.getKeyDisplay("universal.return"), gui.getKeyDisplay("universal.quit")): gui.Tr.SLocalize("close"),
"x": gui.Tr.SLocalize("menu"), fmt.Sprintf("%s", gui.getKeyDisplay("universal.optionMenu")): gui.Tr.SLocalize("menu"),
"1-5": gui.Tr.SLocalize("jump"), "1-5": gui.Tr.SLocalize("jump"),
}) })
} }

View File

@ -18,9 +18,9 @@ func (gui *Gui) handleMenuSelect(g *gocui.Gui, v *gocui.View) error {
func (gui *Gui) renderMenuOptions() error { func (gui *Gui) renderMenuOptions() error {
optionsMap := map[string]string{ optionsMap := map[string]string{
"esc/q": gui.Tr.SLocalize("close"), fmt.Sprintf("%s/%s", gui.getKeyDisplay("universal.return"), gui.getKeyDisplay("universal.quit")): gui.Tr.SLocalize("close"),
"↑ ↓": gui.Tr.SLocalize("navigate"), fmt.Sprintf("%s %s", gui.getKeyDisplay("universal.prevItem"), gui.getKeyDisplay("universal.nextItem")): gui.Tr.SLocalize("navigate"),
"space": gui.Tr.SLocalize("execute"), gui.getKeyDisplay("universal.select"): gui.Tr.SLocalize("execute"),
} }
return gui.renderOptionsMap(optionsMap) return gui.renderOptionsMap(optionsMap)
} }