aboutsummaryrefslogtreecommitdiff
path: root/cmd-move-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-move-window.c')
-rw-r--r--cmd-move-window.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/cmd-move-window.c b/cmd-move-window.c
index b7f02091..7881c2e0 100644
--- a/cmd-move-window.c
+++ b/cmd-move-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-move-window.c,v 1.5 2009-01-23 16:59:14 nicm Exp $ */
+/* $Id: cmd-move-window.c,v 1.6 2009-07-14 06:42:05 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -54,19 +54,8 @@ cmd_move_window_exec(struct cmd *self, struct cmd_ctx *ctx)
if ((wl_src = cmd_find_window(ctx, data->src, &src)) == 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)