summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/server-fn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c
index c7253dc09d3..89597fe5934 100644
--- a/usr.bin/tmux/server-fn.c
+++ b/usr.bin/tmux/server-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.43 2010/10/05 17:15:21 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.44 2010/10/09 12:58:00 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -280,8 +280,10 @@ server_link_window(struct session *src, struct winlink *srcwl,
if (dstidx != -1)
dstwl = winlink_find_by_index(&dst->windows, dstidx);
if (dstwl != NULL) {
- if (dstwl->window == srcwl->window)
+ if (dstwl->window == srcwl->window) {
+ xasprintf(cause, "same index: %d", dstidx);
return (-1);
+ }
if (killflag) {
/*
* Can't use session_detach as it will destroy session