]> git.ipfire.org Git - thirdparty/systemd.git/commit
find_legacy_keymap: fix empty variant matching
authorAdam Williamson <awilliam@redhat.com>
Fri, 15 Sep 2023 22:35:36 +0000 (15:35 -0700)
committerAdam Williamson <awilliam@redhat.com>
Tue, 19 Sep 2023 00:06:02 +0000 (17:06 -0700)
commitbf09ab0184c2d84a6936f1fc4925d6ddf2b7e4c0
tree7c61559ef2df2063bcb00a41d3e88a459c64fc39
parent5a77fbb81fa1b3c98b21d1277efee1d83ecbb963
find_legacy_keymap: fix empty variant matching

We should give a match bonus if the X context variant is empty
and the xvariant column in kbd-model-map is "-" (which means
none). Currently, we don't, which means that if you call this
on a context with layouts bg,us and no variant, you get the
console layout bg_pho-utf8 instead of bg_bds-utf8 (because both
score the same, and the bg_pho-utf8 row comes first). You should
get bg_bds-utf8 in this case.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
src/locale/localed-util.c
src/locale/test-localed-util.c