diff options
| author | 2012-05-29 08:11:34 +0000 | |
|---|---|---|
| committer | 2012-05-29 08:11:34 +0000 | |
| commit | 72df9592845d38289b51c514fb326d1e0f1f4d58 (patch) | |
| tree | 58ac0be8194cfe1ff79d6fca7b8a693462450144 /usr.bin/tmux/cmd-kill-window.c | |
| parent | When writing the new volume header to disk, write back the whole (diff) | |
| download | wireguard-openbsd-72df9592845d38289b51c514fb326d1e0f1f4d58.tar.xz wireguard-openbsd-72df9592845d38289b51c514fb326d1e0f1f4d58.zip | |
Use session from -t for killw -a, from Chris Johnsen.
Diffstat (limited to 'usr.bin/tmux/cmd-kill-window.c')
| -rw-r--r-- | usr.bin/tmux/cmd-kill-window.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-kill-window.c b/usr.bin/tmux/cmd-kill-window.c index 1648d462c51..f96663554ce 100644 --- a/usr.bin/tmux/cmd-kill-window.c +++ b/usr.bin/tmux/cmd-kill-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-window.c,v 1.9 2012/04/23 22:10:45 nicm Exp $ */ +/* $OpenBSD: cmd-kill-window.c,v 1.10 2012/05/29 08:11:34 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -41,12 +41,13 @@ cmd_kill_window_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; struct winlink *wl, *wl2; + struct session *s; - if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) + if ((wl = cmd_find_window(ctx, args_get(args, 't'), &s)) == NULL) return (-1); if (args_has(args, 'a')) { - RB_FOREACH(wl2, winlinks, &ctx->curclient->session->windows) { + RB_FOREACH(wl2, winlinks, &s->windows) { if (wl != wl2) server_kill_window(wl2->window); } |
