mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 01:18:52 +00:00
Treat trying to link or move to the same window as an error to avoid
removing it accidentally.
This commit is contained in:
parent
8363e31953
commit
cc474b4ede
@ -281,7 +281,7 @@ server_link_window(struct session *src, struct winlink *srcwl,
|
|||||||
dstwl = winlink_find_by_index(&dst->windows, dstidx);
|
dstwl = winlink_find_by_index(&dst->windows, dstidx);
|
||||||
if (dstwl != NULL) {
|
if (dstwl != NULL) {
|
||||||
if (dstwl->window == srcwl->window)
|
if (dstwl->window == srcwl->window)
|
||||||
return (0);
|
return (-1);
|
||||||
if (killflag) {
|
if (killflag) {
|
||||||
/*
|
/*
|
||||||
* Can't use session_detach as it will destroy session
|
* Can't use session_detach as it will destroy session
|
||||||
|
Loading…
Reference in New Issue
Block a user