From cc474b4ede4644a417f838efe2cc53c6a73028e4 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 11 Aug 2010 07:36:23 +0000 Subject: [PATCH] Treat trying to link or move to the same window as an error to avoid removing it accidentally. --- server-fn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-fn.c b/server-fn.c index 4ecbce9e..03c89cf5 100644 --- a/server-fn.c +++ b/server-fn.c @@ -281,7 +281,7 @@ server_link_window(struct session *src, struct winlink *srcwl, dstwl = winlink_find_by_index(&dst->windows, dstidx); if (dstwl != NULL) { if (dstwl->window == srcwl->window) - return (0); + return (-1); if (killflag) { /* * Can't use session_detach as it will destroy session