Symbols: Don't include NoSymbols in the map Instead of using NoSymbol in the map, we use num_syms == 0 to signify the non-presence of a symbol. So instead of adding NoSymbol mappings to the list regardless, detect them and set num_syms == 0. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 6e7ef40..dce840b 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -1071,6 +1071,11 @@ AddSymbolsToKey(KeyInfo *key, struct xkb_keymap *keymap,
key->symsMapNumEntries[ndx][i] = 0;
break;
}
+ if (key->symsMapNumEntries[ndx][i] == 1 &&
+ key->syms[ndx][key->symsMapIndex[ndx][i] + j] == XKB_KEY_NoSymbol) {
+ key->symsMapIndex[ndx][i] = -1;
+ key->symsMapNumEntries[ndx][i] = 0;
+ }
}
}
for (j = key->numLevels[ndx] - 1;