Cleanup: filter out empty keybindings earlier

This doesn't make a difference for the behavior, it just looks strange to
include the empty bindings first and then filter them out in the next statement.
This commit is contained in:
Stefan Haller
2026-05-28 19:26:43 +02:00
parent 76d0dc15ca
commit b3491f4e37
+1 -1
View File
@@ -46,7 +46,7 @@ func (self *OptionsMapMgr) renderContextOptionsMap() {
}))
allBindings := append(currentContextBindings, lo.Filter(globalBindings, func(b *types.Binding, _ int) bool {
return len(b.Keys) == 0 || !currentContextKeys.Includes(b.Keys[0])
return len(b.Keys) > 0 && !currentContextKeys.Includes(b.Keys[0])
})...)
bindingsToDisplay := lo.Filter(allBindings, func(binding *types.Binding, _ int) bool {