Commit 322cd8563c9bc2ca6ddfda72f8091e96fbe4c814

Ran Benita 2019-11-12T20:34:31

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>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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