summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-07-15 17:45:29 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-07-15 17:45:29 +0000
commitac2ab6501d242bf48f1632da69c160966fb3ce44 (patch)
treecba13c0fddbec49387c67a76bfa690f9f0aaa664 /cmd.c
parent8bfbc8c61d14369a023444f49a4708e551cb7342 (diff)
Add a -k flag to unlink-window which makes it behave the same as the old
kill-window - if a window is linked into only one session it unlinked and destroyed.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index 0cdc503c..69381973 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.101 2009-07-14 06:42:05 nicm Exp $ */
+/* $Id: cmd.c,v 1.102 2009-07-15 17:45:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -642,7 +642,7 @@ cmd_find_index(struct cmd_ctx *ctx, const char *arg, struct session **sp)
*/
if ((s = cmd_current_session(ctx)) == NULL) {
ctx->error(ctx, "can't establish current session");
- return (NULL);
+ return (-1);
}
/* A NULL argument means the current session and "no window" (-1). */