mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-04 03:48:07 +02:00
change menu keybinding from ? to x
This commit is contained in:
parent
08395ae76c
commit
db2e2160a9
@ -353,7 +353,7 @@ func (gui *Gui) renderGlobalOptions(g *gocui.Gui) error {
|
||||
"PgUp/PgDn": gui.Tr.SLocalize("scroll"),
|
||||
"← → ↑ ↓": gui.Tr.SLocalize("navigate"),
|
||||
"esc/q": gui.Tr.SLocalize("close"),
|
||||
"?": gui.Tr.SLocalize("menu"),
|
||||
"x": gui.Tr.SLocalize("menu"),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ func (gui *Gui) GetKeybindings() []Binding {
|
||||
Description: gui.Tr.SLocalize("refresh"),
|
||||
}, {
|
||||
ViewName: "",
|
||||
Key: '?',
|
||||
Key: 'x',
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.handleMenu,
|
||||
}, {
|
||||
|
@ -30,7 +30,7 @@ func main() {
|
||||
file.WriteString("# Lazygit " + a.Tr.SLocalize("menu"))
|
||||
|
||||
for _, binding := range bindings {
|
||||
if key := a.Gui.GetKey(binding); key != "" && (binding.Description != "" || key == "?") {
|
||||
if key := a.Gui.GetKey(binding); key != "" && (binding.Description != "" || key == "x") {
|
||||
if binding.ViewName != current {
|
||||
current = binding.ViewName
|
||||
if current == "" {
|
||||
@ -44,7 +44,7 @@ func main() {
|
||||
// workaround to include menu keybinding in cheatsheet
|
||||
// could not add this Description field directly to keybindings.go,
|
||||
// because then menu key would be displayed in menu itself and that is undesirable
|
||||
if key == "?" {
|
||||
if key == "x" {
|
||||
binding.Description = a.Tr.SLocalize("menu")
|
||||
}
|
||||
content = fmt.Sprintf("\t<kbd>%s</kbd>%s %s\n", key, strings.TrimPrefix(utils.WithPadding(key, padWidth), key), binding.Description)
|
||||
|
Loading…
Reference in New Issue
Block a user