diff options
Diffstat (limited to 'cmd-link-window.c')
-rw-r--r-- | cmd-link-window.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/cmd-link-window.c b/cmd-link-window.c index 143e3cf0..4e1ada81 100644 --- a/cmd-link-window.c +++ b/cmd-link-window.c @@ -52,19 +52,8 @@ cmd_link_window_exec(struct cmd *self, struct cmd_ctx *ctx) if ((wl_src = cmd_find_window(ctx, data->src, NULL)) == NULL) return (-1); - - if (arg_parse_window(data->dst, &dst, &idx) != 0) { - ctx->error(ctx, "bad window: %s", data->dst); - return (-1); - } - if (dst == NULL) - dst = ctx->cursession; - if (dst == NULL) - dst = cmd_current_session(ctx); - if (dst == NULL) { - ctx->error(ctx, "session not found: %s", data->dst); + if ((idx = cmd_find_index(ctx, data->dst, &dst)) == -2) return (-1); - } wl_dst = NULL; if (idx != -1) |