Skip to content

Commit

Permalink
rules: fix variant index being ignored for layout index (xkbcommon#475)
Browse files Browse the repository at this point in the history
We accidentally ignored the variant index and used the layout index instead.
In realistic rules they are always the same but don't have to be.
  • Loading branch information
wysiwys authored and wismill committed Dec 16, 2024
1 parent 56c046d commit 6f2dbd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xkbcomp/rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ matcher_rule_apply_if_matches(struct matcher *m, struct scanner *s)
matched = match_value_and_mark(m, value, to, match_type);
}
else if (mlvo == MLVO_VARIANT) {
xkb_layout_index_t idx = m->mapping.layout_idx;
xkb_layout_index_t idx = m->mapping.variant_idx;
idx = (idx == XKB_LAYOUT_INVALID ? 0 : idx);
to = &darray_item(m->rmlvo.variants, idx);
matched = match_value_and_mark(m, value, to, match_type);
Expand Down

0 comments on commit 6f2dbd9

Please sign in to comment.