From: Sebastian Ullrich <[email protected]>
As mentioned in #i3, while this patch works for me, I'm not sure
how the (untouched) maybe_back_and_forth invocation directly
above could ever return true (ie, a non-existing ws would have
to be focused?).
---
src/commands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/commands.c b/src/commands.c
index 1eee027..8db66ee 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -838,23 +838,23 @@ void cmd_workspace_number(I3_CMD, char *which) {
if (!workspace) {
LOG("There is no workspace with number %ld, creating a new one.\n",
parsed_num);
ysuccess(true);
/* terminate the which string after the endposition of the number */
*endptr = '\0';
if (maybe_back_and_forth(cmd_output, which))
return;
workspace_show_by_name(which);
cmd_output->needs_tree_render = true;
return;
}
- if (maybe_back_and_forth(cmd_output, which))
+ if (maybe_back_and_forth(cmd_output, workspace->name))
return;
workspace_show(workspace);
cmd_output->needs_tree_render = true;
// XXX: default reply for now, make this a better reply
ysuccess(true);
}
/*
* Implementation of 'workspace back_and_forth'.
*
--
1.7.11.5