aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-05-22 20:50:03 +0000
committerTiago Cunha <tcunha@gmx.com>2012-05-22 20:50:03 +0000
commit3604b31b6f1deb996102f5e8767818b6dcf2d582 (patch)
tree9279fb2f016bd3f45a4e8bc7dd262f03223e2c92
parentd61c572c92878d24dd50172df4a4e1a1d445f233 (diff)
downloadrtmux-3604b31b6f1deb996102f5e8767818b6dcf2d582.tar.gz
rtmux-3604b31b6f1deb996102f5e8767818b6dcf2d582.tar.bz2
rtmux-3604b31b6f1deb996102f5e8767818b6dcf2d582.zip
Sync OpenBSD patchset 1112:
Use -t for move-window with -r rather than dying. Reported by Ben Boeckel and Thomas Adam.
-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 acb50442..e3cb1f35 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();