summaryrefslogtreecommitdiffstats
path: root/cmd-move-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-05-13 07:33:31 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-05-13 07:33:31 +0000
commit50cefec497946f7e19213470880bb5fbe2b8d7f1 (patch)
tree720a5b743c1d1ffd4a47484604f4e87a09311bfd /cmd-move-window.c
parent37f9bb46d815e8ba6377c3435d72c052267831ed (diff)
Use -t for move-window with -r rather than dying. Reported by Ben
Boeckel and Thomas Adam.
Diffstat (limited to 'cmd-move-window.c')
-rw-r--r--cmd-move-window.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd-move-window.c b/cmd-move-window.c
index 5e30d6b5..6268226e 100644
--- a/cmd-move-window.c
+++ b/cmd-move-window.c
@@ -47,11 +47,10 @@ cmd_move_window_exec(struct cmd *self, struct cmd_ctx *ctx)
char *cause;
int idx, kflag, dflag;
- if ((s = ctx->curclient->session) == NULL)
- return (-1);
+ if (args_has(args, 'r')) {
+ if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL)
+ return (-1);
- if (args_has(args, 'r'))
- {
session_renumber_windows(s);
recalculate_sizes();