Fix bindings being cleared if multiple bindings for same action have the same combination

This actually seems to be the case in catch (dash is bound to shift
twice). This is annoying but harmless, so let's work around it for now
to avoid ruining users' configs.
This commit is contained in:
Bartłomiej Dach 2023-10-16 21:29:42 +02:00
parent 3aae07d1ca
commit 828cedea33
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ public static int ClearDuplicateBindings(IEnumerable<IKeyBinding> keyBindings)
foreach (var group in lookup)
{
if (group.Count() <= 1)
if (group.Select(kb => kb.Action).Distinct().Count() <= 1)
continue;
foreach (var binding in group)