Implement 'rename workspace <old_name> to <new_name>'

This commit is contained in:
Michael Stapelberg
2012-04-08 20:34:31 +02:00
parent ad513b4799
commit 373b4ad74a
7 changed files with 183 additions and 4 deletions

View File

@ -52,8 +52,8 @@ Con *workspace_get(const char *num, bool *created) {
workspace->type = CT_WORKSPACE;
FREE(workspace->name);
workspace->name = sstrdup(num);
/* We set ->num to the number if this workspaces name consists only of
* a positive number. Otherwise its a named ws and num will be -1. */
/* We set ->num to the number if this workspaces name begins with a
* positive number. Otherwise its a named ws and num will be -1. */
char *endptr = NULL;
long parsed_num = strtol(num, &endptr, 10);
if (parsed_num == LONG_MIN ||