mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-27 23:08:02 +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"),
|
"PgUp/PgDn": gui.Tr.SLocalize("scroll"),
|
||||||
"← → ↑ ↓": gui.Tr.SLocalize("navigate"),
|
"← → ↑ ↓": gui.Tr.SLocalize("navigate"),
|
||||||
"esc/q": gui.Tr.SLocalize("close"),
|
"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"),
|
Description: gui.Tr.SLocalize("refresh"),
|
||||||
}, {
|
}, {
|
||||||
ViewName: "",
|
ViewName: "",
|
||||||
Key: '?',
|
Key: 'x',
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleMenu,
|
Handler: gui.handleMenu,
|
||||||
}, {
|
}, {
|
||||||
|
@ -30,7 +30,7 @@ func main() {
|
|||||||
file.WriteString("# Lazygit " + a.Tr.SLocalize("menu"))
|
file.WriteString("# Lazygit " + a.Tr.SLocalize("menu"))
|
||||||
|
|
||||||
for _, binding := range bindings {
|
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 {
|
if binding.ViewName != current {
|
||||||
current = binding.ViewName
|
current = binding.ViewName
|
||||||
if current == "" {
|
if current == "" {
|
||||||
@ -44,7 +44,7 @@ func main() {
|
|||||||
// workaround to include menu keybinding in cheatsheet
|
// workaround to include menu keybinding in cheatsheet
|
||||||
// could not add this Description field directly to keybindings.go,
|
// could not add this Description field directly to keybindings.go,
|
||||||
// because then menu key would be displayed in menu itself and that is undesirable
|
// 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")
|
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)
|
content = fmt.Sprintf("\t<kbd>%s</kbd>%s %s\n", key, strings.TrimPrefix(utils.WithPadding(key, padWidth), key), binding.Description)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user