Didn't we discuss this before and decide this check was wrong anyway? There are several places that add references to windows, and there could be more soon. I think session_is_linked needs to actually walk the sessions and check with winlink_find_by_window. Or we need to maintain a linked flag on the window.
On Wed, Dec 28, 2016 at 05:33:06PM +0000, Thomas Adam wrote: > With the hooks support, we've recently increased the number of references on a > given window. This throws out the check for determining if a window is linked > to more than one session (format: window_is_linked). > > Change the check to return over the threshold of the references before the > window is linked. > --- > session.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/session.c b/session.c > index d89bc6a0..858a0f0c 100644 > --- a/session.c > +++ b/session.c > @@ -428,7 +428,7 @@ session_is_linked(struct session *s, struct window *w) > > if ((sg = session_group_find(s)) != NULL) > return (w->references != session_group_count(sg)); > - return (w->references != 1); > + return (w->references > 2); > } > > static struct winlink * > -- > 2.11.0 > > -- > You received this message because you are subscribed to the Google Groups > "tmux-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send an email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
