diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-08-11 07:36:24 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-08-11 07:36:24 +0000 |
commit | d5a84b18e83ef67624593af57eca925c65bd1191 (patch) | |
tree | c78e07f27acbf4627d1028b6ba2f62b3054c398d | |
parent | 0a79760010cafa3e25fd950c0c3d22f8cc649567 (diff) |
Treat trying to link or move to the same window as an error to avoid
removing it accidentally.
-rw-r--r-- | usr.bin/tmux/server-fn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index 879cef21994..3e47f7b6edc 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.40 2010/07/24 20:11:59 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.41 2010/08/11 07:36:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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 |