mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 22:01:43 +03:00
Add field Alternative to gui.Binding
Document and use alternative keybinding for generating cheatsheet. Add alt keybinding fn+up/down for scroll up/down actions. Also run `go run scripts/generate_cheatsheet.go`.
This commit is contained in:
committed by
Jesse Duffield
parent
357b8fa98f
commit
97f060d38d
@ -59,6 +59,9 @@ func formatTitle(title string) string {
|
||||
}
|
||||
|
||||
func formatBinding(binding *gui.Binding) string {
|
||||
if binding.Alternative != "" {
|
||||
return fmt.Sprintf(" <kbd>%s</kbd>: %s (%s)\n", binding.GetKey(), binding.Description, binding.Alternative)
|
||||
}
|
||||
return fmt.Sprintf(" <kbd>%s</kbd>: %s\n", binding.GetKey(), binding.Description)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user