Bugfix: Don’t consider the workspace next/prev command when looking for named workspaces

Fixes #469
This commit is contained in:
Michael Stapelberg 2011-08-17 12:28:45 +02:00
parent 13ecbf43c9
commit 7c6f693c8a
1 changed files with 6 additions and 0 deletions

View File

@ -425,6 +425,12 @@ void init_ws_for_output(Output *output, Con *content) {
continue;
DLOG("relevant command = %s\n", bind->command);
char *target = bind->command + strlen("workspace ");
/* We check if this is the workspace next/prev command. Beware: The
* workspace names "next" and "prev" are OK, so we check before
* stripping the double quotes */
if (strncasecmp(target, "next", strlen("next")) == 0 ||
strncasecmp(target, "prev", strlen("prev")) == 0)
continue;
if (*target == '"')
target++;
FREE(ws->name);