From 625d5bdba6318377baa716ad5ea5a0b2f85b1c0e Mon Sep 17 00:00:00 2001 From: Eika Enge Date: Sun, 26 May 2013 18:24:55 +0700 Subject: [PATCH 1/2] Bugfix: Ignore spaces in front of default workspace name --- src/workspace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/workspace.c b/src/workspace.c index 5a0913bf..2c26b0ea 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -128,6 +128,8 @@ Con *create_workspace_on_output(Output *output, Con *content) { continue; DLOG("relevant command = %s\n", bind->command); char *target = bind->command + strlen("workspace "); + while((*target == ' ' || *target == '\t') && target != '\0') + target++; /* We check if this is the workspace * next/prev/next_on_output/prev_on_output/back_and_forth/number command. * Beware: The workspace names "next", "prev", "next_on_output", From d055e70a89f126501cf8eb5550b50576b3ce855f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 29 Jun 2013 20:58:33 +0200 Subject: [PATCH 2/2] tests: update t/172-start-on-named-ws.t to check the previous commit --- testcases/t/172-start-on-named-ws.t | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/testcases/t/172-start-on-named-ws.t b/testcases/t/172-start-on-named-ws.t index 9e6806a4..09b708be 100644 --- a/testcases/t/172-start-on-named-ws.t +++ b/testcases/t/172-start-on-named-ws.t @@ -70,4 +70,22 @@ is_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar'); exit_gracefully($pid); +################################################################################ +# 4: now with whitespace in front of the workspace number +################################################################################ + +$config = <