diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/binds.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/binds.go b/config/binds.go index 1e9727a5..1b2799f2 100644 --- a/config/binds.go +++ b/config/binds.go @@ -200,8 +200,8 @@ func LoadBinds(binds *ini.File, baseName string, baseGroup **KeyBindings) error } for _, sectionName := range binds.SectionStrings() { - if !strings.Contains(sectionName, baseName+":") || - strings.Contains(sectionName, baseName+"::") { + if !strings.HasPrefix(sectionName, baseName+":") || + strings.HasPrefix(sectionName, baseName+"::") { continue } @@ -276,6 +276,9 @@ func MergeBindings(bindings ...*KeyBindings) *KeyBindings { merged := NewKeyBindings() for _, b := range bindings { merged.Bindings = append(merged.Bindings, b.Bindings...) + if !b.Globals { + break + } } merged.ExKey = bindings[0].ExKey merged.Globals = bindings[0].Globals |