mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 16:06:37 +01:00
Strip quotes from workspace name v2
This is a more general fix for #444
This reverts part of commit 222f0d44fc
.
This commit is contained in:
parent
fc8e5703a5
commit
0ba3f08f52
1 changed files with 2 additions and 6 deletions
|
@ -717,14 +717,11 @@ static struct cmd_results *cmd_move(int argc, char **argv) {
|
||||||
return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views.");
|
return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views.");
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ws_name = strdup(argv[3]);
|
const char *ws_name = argv[3];
|
||||||
strip_quotes(ws_name);
|
|
||||||
swayc_t *ws;
|
swayc_t *ws;
|
||||||
if (argc == 5 && strcasecmp(ws_name, "number") == 0) {
|
if (argc == 5 && strcasecmp(ws_name, "number") == 0) {
|
||||||
// move "container to workspace number x"
|
// move "container to workspace number x"
|
||||||
free(ws_name);
|
ws_name = argv[4];
|
||||||
ws_name = strdup(argv[4]);
|
|
||||||
strip_quotes(ws_name);
|
|
||||||
ws = workspace_by_number(ws_name);
|
ws = workspace_by_number(ws_name);
|
||||||
} else {
|
} else {
|
||||||
ws = workspace_by_name(ws_name);
|
ws = workspace_by_name(ws_name);
|
||||||
|
@ -733,7 +730,6 @@ static struct cmd_results *cmd_move(int argc, char **argv) {
|
||||||
if (ws == NULL) {
|
if (ws == NULL) {
|
||||||
ws = workspace_create(ws_name);
|
ws = workspace_create(ws_name);
|
||||||
}
|
}
|
||||||
free(ws_name);
|
|
||||||
move_container_to(view, get_focused_container(ws));
|
move_container_to(view, get_focused_container(ws));
|
||||||
} else if (strcasecmp(argv[1], "to") == 0 && strcasecmp(argv[2], "output") == 0) {
|
} else if (strcasecmp(argv[1], "to") == 0 && strcasecmp(argv[2], "output") == 0) {
|
||||||
// move container to output x
|
// move container to output x
|
||||||
|
|
Loading…
Reference in a new issue