Bugfix: Use correct buffer size, quote workspace names
This fixes problems with the workspace 'next' and workspace names longer than 40 characters
This commit is contained in:
parent
79479617c7
commit
3892d616cf
@ -377,8 +377,9 @@ void handle_button(xcb_button_press_event_t *event) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
char buffer[strlen(cur_ws->name) + 11];
|
const size_t len = strlen(cur_ws->name) + strlen("workspace \"\"") + 1;
|
||||||
snprintf(buffer, 50, "workspace %s", cur_ws->name);
|
char buffer[len];
|
||||||
|
snprintf(buffer, len, "workspace \"%s\"", cur_ws->name);
|
||||||
i3_send_msg(I3_IPC_MESSAGE_TYPE_COMMAND, buffer);
|
i3_send_msg(I3_IPC_MESSAGE_TYPE_COMMAND, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user