parser: fix merge mode only applied to first vmod in a virtual_modifiers statement Given augment virtual_modifiers NumLock,Alt,LevelThree Previously it was expanded (directly in the parser) to augment virtual_modifiers NumLock; virtual_modifiers Alt; virtual_modifiers LevelThree; Now it expands to augment virtual_modifiers NumLock; augment virtual_modifiers Alt; augment virtual_modifiers LevelThree; Signed-off-by: Ran Benita <ran@unusedvar.com>
diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y
index daf2cdd..7145c1b 100644
--- a/src/xkbcomp/parser.y
+++ b/src/xkbcomp/parser.y
@@ -314,7 +314,8 @@ Decl : OptMergeMode VarDecl
}
| OptMergeMode VModDecl
{
- $2->merge = $1;
+ for (VModDef *vmod = $2; vmod; vmod = (VModDef *) vmod->common.next)
+ vmod->merge = $1;
$$ = (ParseCommon *) $2;
}
| OptMergeMode InterpretDecl