From cc40317207c165f6d7eab4ec8d4f67fd45d8eb5e Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 27 Dec 2019 09:28:37 -0500 Subject: [PATCH] skip empty keybinding configs --- runtime/ui/key/binding.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/ui/key/binding.go b/runtime/ui/key/binding.go index 5d4605a..69fe007 100644 --- a/runtime/ui/key/binding.go +++ b/runtime/ui/key/binding.go @@ -59,6 +59,10 @@ func NewBindingFromConfig(gui *gocui.Gui, influence string, configKeys []string, var parsedKeys []keybinding.Key for _, configKey := range configKeys { bindStr := viper.GetString(configKey) + if bindStr == "" { + logrus.Debug("skipping keybinding '%s' (no value given)", configKey) + continue + } logrus.Debugf("parsing keybinding '%s' --> '%s'", configKey, bindStr) keys, err := keybinding.ParseAll(bindStr)