From: Michael Stapelberg Date: Fri, 14 Dec 2012 20:41:56 +0000 (+0100) Subject: fix bind[code|sym] --release (Thanks paolo) X-Git-Tag: 4.5~112^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6dfb08170cb1b0bd1875b80c85fbc225ff22274d;p=i3%2Fi3 fix bind[code|sym] --release (Thanks paolo) fixes #890 --- diff --git a/parser-specs/config.spec b/parser-specs/config.spec index 8622c62e..7a31a5d8 100644 --- a/parser-specs/config.spec +++ b/parser-specs/config.spec @@ -270,6 +270,8 @@ state FONT: # bindsym/bindcode state BINDING: + release = '--release' + -> modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch' -> '+' @@ -313,6 +315,8 @@ state MODE_IGNORE_LINE: -> MODE state MODE_BINDING: + release = '--release' + -> modifiers = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Shift', 'Control', 'Ctrl', 'Mode_switch' -> '+' diff --git a/testcases/t/201-config-parser.t b/testcases/t/201-config-parser.t index ab3d7314..d6010795 100644 --- a/testcases/t/201-config-parser.t +++ b/testcases/t/201-config-parser.t @@ -44,6 +44,7 @@ my $config = <<'EOT'; mode "meh" { bindsym Mod1 + Shift + x resize grow bindcode Mod1+44 resize shrink + bindsym --release Mod1+x exec foo } EOT @@ -51,6 +52,7 @@ my $expected = <<'EOT'; cfg_enter_mode(meh) cfg_mode_binding(bindsym, Mod1,Shift, x, (null), resize grow) cfg_mode_binding(bindcode, Mod1, 44, (null), resize shrink) +cfg_mode_binding(bindsym, Mod1, x, --release, exec foo) EOT is(parser_calls($config),