Bugfix: properly handle comments in colors {} blocks of bar config (+test) (Thanks fernandotcl)

This commit is contained in:
Michael Stapelberg
2011-10-25 22:31:57 +01:00
parent 704c9967b2
commit e710477a07
2 changed files with 36 additions and 0 deletions

View File

@ -106,6 +106,7 @@ EOL (\r?\n)
<BAR>colors { yy_push_state(BAR_COLORS); return TOK_BAR_COLORS; }
<BAR_COLORS>"{" { return '{'; }
<BAR_COLORS>"}" { yy_pop_state(); return '}'; }
<BAR_COLORS>^[ \t]*#[^\n]* { return TOKCOMMENT; }
<BAR_COLORS>background { yy_push_state(BAR_COLOR); return TOK_BAR_COLOR_BACKGROUND; }
<BAR_COLORS>statusline { yy_push_state(BAR_COLOR); return TOK_BAR_COLOR_STATUSLINE; }
<BAR_COLORS>focused_workspace { BAR_DOUBLE_COLOR; return TOK_BAR_COLOR_FOCUSED_WORKSPACE; }