diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2022-10-15 22:17:00 +0900 |
---|---|---|
committer | Ryooooooga <eial5q265e5@gmail.com> | 2022-10-18 22:20:03 +0900 |
commit | 14ec0cd92e94ecf60c0e2150b2d62d6987250f0e (patch) | |
tree | 4be7ed3aecb8d23fda3e1f81bc82990c6f474689 | |
parent | 36c6462a534ff328051bd81ed90eb626d1a59f09 (diff) |
feat: allow `null` in keybindings
-rw-r--r-- | docs/Config.md | 2 | ||||
-rw-r--r-- | pkg/gui/keybindings/keybindings.go | 1 | ||||
-rw-r--r-- | pkg/gui/options_menu_panel.go | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/docs/Config.md b/docs/Config.md index d0d90ea31..937fc847d 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -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) +You can disable certain key bindings by specifying `null`. + ### Example Keybindings For Colemak Users ```yaml diff --git a/pkg/gui/keybindings/keybindings.go b/pkg/gui/keybindings/keybindings.go index a59180b56..09833944f 100644 --- a/pkg/gui/keybindings/keybindings.go +++ b/pkg/gui/keybindings/keybindings.go @@ -179,6 +179,5 @@ func GetKey(key string) types.Key { } else if runeCount == 1 { return []rune(key)[0] } - log.Fatal("Key empty for keybinding: " + strings.ToLower(key)) return nil } diff --git a/pkg/gui/options_menu_panel.go b/pkg/gui/options_menu_panel.go index 909c97fc8..68c8aa49d 100644 --- a/pkg/gui/options_menu_panel.go +++ b/pkg/gui/options_menu_panel.go @@ -58,7 +58,7 @@ func (gui *Gui) handleCreateOptionsMenu() error { OpensMenu: binding.OpensMenu, Label: binding.Description, OnPress: func() error { - if binding.Key == nil { + if binding.Handler == nil { return nil } |