skip empty keybinding configs
This commit is contained in:
parent
bf90d13567
commit
cc40317207
@ -59,6 +59,10 @@ func NewBindingFromConfig(gui *gocui.Gui, influence string, configKeys []string,
|
|||||||
var parsedKeys []keybinding.Key
|
var parsedKeys []keybinding.Key
|
||||||
for _, configKey := range configKeys {
|
for _, configKey := range configKeys {
|
||||||
bindStr := viper.GetString(configKey)
|
bindStr := viper.GetString(configKey)
|
||||||
|
if bindStr == "" {
|
||||||
|
logrus.Debug("skipping keybinding '%s' (no value given)", configKey)
|
||||||
|
continue
|
||||||
|
}
|
||||||
logrus.Debugf("parsing keybinding '%s' --> '%s'", configKey, bindStr)
|
logrus.Debugf("parsing keybinding '%s' --> '%s'", configKey, bindStr)
|
||||||
|
|
||||||
keys, err := keybinding.ParseAll(bindStr)
|
keys, err := keybinding.ParseAll(bindStr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user