From 75afef64638485aa982519cee21a7b55e2b90a28 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 31 Oct 2014 23:53:39 +0100 Subject: command: don't require whitespace before ';' or '#' This change is probably too simplistic, but most things appear to work, so I don't care about that now. Fixes #1232. --- input/cmd_parse.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'input') diff --git a/input/cmd_parse.c b/input/cmd_parse.c index 6f60c0c081..7fdce93901 100644 --- a/input/cmd_parse.c +++ b/input/cmd_parse.c @@ -197,10 +197,7 @@ error: static bool read_token(bstr str, bstr *out_rest, bstr *out_token) { bstr t = bstr_lstrip(str); - char nextc = t.len > 0 ? t.start[0] : 0; - if (nextc == '#' || nextc == ';') - return false; // comment or command separator - int next = bstrcspn(t, WHITESPACE); + int next = bstrcspn(t, WHITESPACE "#;"); if (!next) return false; *out_token = bstr_splice(t, 0, next); -- cgit v1.2.3