From 6f383d74b8461da66f1d3b59c0daad8af6e23efd Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Mon, 23 Jan 2012 04:34:13 +0100 Subject: [PATCH] Fix status parsing, allow ^ instead of \ for sequence first char --- src/status.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/status.c b/src/status.c index 8e94031..a5a6dac 100644 --- a/src/status.c +++ b/src/status.c @@ -64,7 +64,7 @@ status_parse_mouse(struct status_seq *sq, char *str) int i; if(*str != '(' || !(end = strchr(str, ')'))) - return str + 1; + return str; i = parse_args(++str, ';', ')', 3, arg); @@ -98,7 +98,7 @@ status_parse(struct status_ctx *ctx) for(; *dstr; ++dstr) { /* Check if this is a sequence */ - if(*dstr != '\\') + if(*dstr != '^' && *dstr != '\\') continue; p = ++dstr; @@ -159,8 +159,9 @@ status_parse(struct status_ctx *ctx) * Optional mousebind sequence(s) \[](button;func;cmd) * Parse it while there is a mousebind sequence. */ - dstr = ++end; + dstr = end + 1; while((*(dstr = status_parse_mouse(sq, dstr)) == '(')); + --dstr; prev = sq; }