Merge pull request #1608 from mh21/renaming-empty-ws-startup

Update old_name when renaming current workspace
This commit is contained in:
Michael Stapelberg 2015-03-30 22:01:18 +02:00
commit 2759a308a2
2 changed files with 6 additions and 0 deletions

View File

@ -1851,6 +1851,7 @@ void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) {
!strcasecmp(child->name, old_name));
} else {
workspace = con_get_workspace(focused);
old_name = workspace->name;
}
if (!workspace) {

View File

@ -155,6 +155,11 @@ cmd "rename workspace temp to $first_ws";
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
# second workspace.
cmd "workspace $first_ws";