]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Fix the WANT_QSTRING state
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 13 May 2011 15:03:15 +0000 (17:03 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 13 May 2011 15:03:15 +0000 (17:03 +0200)
src/cmdparse.l

index f07420d3e9d34b254adcf337773354e6729b71e9..3e5dc889098c50fd28834ec3fae9f183a9359672 100644 (file)
@@ -74,6 +74,15 @@ EOL (\r?\n)
                                   cmdyylval.string = copy;
                                   return STR;
                                  }
+<WANT_QSTRING>\"[^\"]+\"         {
+                                  BEGIN(INITIAL);
+                                  /* strip quotes */
+                                  char *copy = sstrdup(yytext+1);
+                                  copy[strlen(copy)-1] = '\0';
+                                  cmdyylval.string = copy;
+                                  return STR;
+                                 }
+
 <WANT_STRING>[^;\n]+             { BEGIN(INITIAL); cmdyylval.string = sstrdup(yytext); return STR; }
 
 [ \t]*                          { return WHITESPACE; }