Merge pull request #1608 from mh21/renaming-empty-ws-startup
Update old_name when renaming current workspace
This commit is contained in:
commit
2759a308a2
|
@ -1851,6 +1851,7 @@ void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) {
|
||||||
!strcasecmp(child->name, old_name));
|
!strcasecmp(child->name, old_name));
|
||||||
} else {
|
} else {
|
||||||
workspace = con_get_workspace(focused);
|
workspace = con_get_workspace(focused);
|
||||||
|
old_name = workspace->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!workspace) {
|
if (!workspace) {
|
||||||
|
|
|
@ -155,6 +155,11 @@ cmd "rename workspace temp to $first_ws";
|
||||||
|
|
||||||
is_num_children($first_ws, 3, 'three containers on the first workspace');
|
is_num_children($first_ws, 3, 'three containers on the first workspace');
|
||||||
|
|
||||||
|
# empty 'from' workspaces should not crash the renaming of startup sequences
|
||||||
|
cmd "workspace $first_ws";
|
||||||
|
cmd "rename workspace to temp";
|
||||||
|
cmd "rename workspace to $first_ws";
|
||||||
|
|
||||||
# Switch to the first workspace and move the focused window to the
|
# Switch to the first workspace and move the focused window to the
|
||||||
# second workspace.
|
# second workspace.
|
||||||
cmd "workspace $first_ws";
|
cmd "workspace $first_ws";
|
||||||
|
|
Loading…
Reference in New Issue