mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 19:39:04 +00:00
Sync OpenBSD patchset 746:
Treat trying to link or move to the same window as an error to avoid removing it accidentally.
This commit is contained in:
parent
761bd3c9e3
commit
e34c6e2305
@ -1,4 +1,4 @@
|
||||
/* $Id: server-fn.c,v 1.109 2010-08-09 21:44:25 tcunha Exp $ */
|
||||
/* $Id: server-fn.c,v 1.110 2010-08-11 22:16:43 tcunha 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
|
||||
|
Loading…
Reference in New Issue
Block a user