diff options
author | 2012-05-13 07:33:31 +0000 | |
---|---|---|
committer | 2012-05-13 07:33:31 +0000 | |
commit | 559d633532d33143e3aefcab1ad8efee5a4543b0 (patch) | |
tree | 581755ea3c17ab662ae43989b7d5f1a2b0f5e6c6 /usr.bin/tmux/cmd-move-window.c | |
parent | Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests (diff) | |
download | wireguard-openbsd-559d633532d33143e3aefcab1ad8efee5a4543b0.tar.xz wireguard-openbsd-559d633532d33143e3aefcab1ad8efee5a4543b0.zip |
Use -t for move-window with -r rather than dying. Reported by Ben
Boeckel and Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/cmd-move-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-move-window.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-move-window.c b/usr.bin/tmux/cmd-move-window.c index 070e548b5b2..4da31af35d6 100644 --- a/usr.bin/tmux/cmd-move-window.c +++ b/usr.bin/tmux/cmd-move-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-move-window.c,v 1.11 2012/04/29 17:20:01 nicm Exp $ */ +/* $OpenBSD: cmd-move-window.c,v 1.12 2012/05/13 07:33:31 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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(); |