mirror of
https://github.com/tmux/tmux.git
synced 2025-04-10 11:08:49 +00:00
Set cause when failing due to linking a window to itself, from Martin
Pieuchot.
This commit is contained in:
parent
08bcd6978c
commit
7aef2994e4
@ -280,8 +280,10 @@ server_link_window(struct session *src, struct winlink *srcwl,
|
|||||||
if (dstidx != -1)
|
if (dstidx != -1)
|
||||||
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) {
|
||||||
|
xasprintf(cause, "same index: %d", dstidx);
|
||||||
return (-1);
|
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