summaryrefslogtreecommitdiffstats
path: root/cmd-kill-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-05-29 08:11:34 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-05-29 08:11:34 +0000
commit226f9fa0126da91e7c335dcb94222c5c1a0c92b4 (patch)
treed432a939e43a725247466db038f6d31a007e04e0 /cmd-kill-window.c
parentf51c55c3f032e4c525cc7aa7ac74c1ce4a9d29ab (diff)
Use session from -t for killw -a, from Chris Johnsen.
Diffstat (limited to 'cmd-kill-window.c')
-rw-r--r--cmd-kill-window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-kill-window.c b/cmd-kill-window.c
index f734eeaf..b772705f 100644
--- a/cmd-kill-window.c
+++ b/cmd-kill-window.c
@@ -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);
}