=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-find-window.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- src/usr.bin/tmux/cmd-find-window.c 2013/03/21 16:09:17 1.22 +++ src/usr.bin/tmux/cmd-find-window.c 2013/03/21 16:09:59 1.23 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-find-window.c,v 1.22 2013/03/21 16:09:17 nicm Exp $ */ +/* $OpenBSD: cmd-find-window.c,v 1.23 2013/03/21 16:09:59 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -139,11 +139,10 @@ const char *template; u_int i, match_flags; - if (ctx->curclient == NULL) { - ctx->error(ctx, "must be run interactively"); + if ((c = cmd_current_client(ctx)) == NULL) { + ctx->error(ctx, "no client available"); return (CMD_RETURN_ERROR); } - c = ctx->curclient; s = c->session; if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)