1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

feat: allow null in keybindings

This commit is contained in:
Ryooooooga
2022-10-15 22:17:00 +09:00
parent 36c6462a53
commit 14ec0cd92e
3 changed files with 3 additions and 2 deletions

View File

@ -436,6 +436,8 @@ gui:
For all possible keybinding options, check [Custom_Keybindings.md](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) For all possible keybinding options, check [Custom_Keybindings.md](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md)
You can disable certain key bindings by specifying `null`.
### Example Keybindings For Colemak Users ### Example Keybindings For Colemak Users
```yaml ```yaml

View File

@ -179,6 +179,5 @@ func GetKey(key string) types.Key {
} else if runeCount == 1 { } else if runeCount == 1 {
return []rune(key)[0] return []rune(key)[0]
} }
log.Fatal("Key empty for keybinding: " + strings.ToLower(key))
return nil return nil
} }

View File

@ -58,7 +58,7 @@ func (gui *Gui) handleCreateOptionsMenu() error {
OpensMenu: binding.OpensMenu, OpensMenu: binding.OpensMenu,
Label: binding.Description, Label: binding.Description,
OnPress: func() error { OnPress: func() error {
if binding.Key == nil { if binding.Handler == nil {
return nil return nil
} }