correctly sort numbered workspaces (+testcase)
Numbered workspaces (workspaces with a name containing only digits) will be inserted in the correct order now. Named workspaces are always sorted after numbered workspaces and in the order of creation.
This commit is contained in:
@ -77,10 +77,12 @@ void tree_init() {
|
||||
free(name);
|
||||
|
||||
/* add a workspace to this output */
|
||||
ws = con_new(oc);
|
||||
ws = con_new(NULL);
|
||||
ws->type = CT_WORKSPACE;
|
||||
ws->num = c;
|
||||
asprintf(&(ws->name), "%d", c);
|
||||
c++;
|
||||
con_attach(ws, oc);
|
||||
|
||||
asprintf(&name, "[i3 con] workspace %s", ws->name);
|
||||
x_set_name(ws, name);
|
||||
|
Reference in New Issue
Block a user