It can be in w->flags, or alternatively just walk the sessions, a flag
would be faster though.

On Tue, Jan 03, 2017 at 11:54:42AM +0000, Thomas Adam wrote:
>    Hi,
>    I don't remember if we discussed it before or not, but it was changed
>    fairly recently, perhaps more as a bodge. **;)
>    I suspect you're right thought; a wl->linked flag is a lot easier to
>    maintain.
>    Thomas
>    On Tue, 3 Jan 2017 at 11:30 Nicholas Marriott
>    <[1][email protected]> wrote:
> 
>      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 [2][email protected].
>      > To post to this group, send an email to
>      [3][email protected].
>      > For more options, visit [4]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 [5][email protected].
>      To post to this group, send an email to [6][email protected].
>      For more options, visit [7]https://groups.google.com/d/optout.
> 
> References
> 
>    Visible links
>    1. mailto:[email protected]
>    2. mailto:tmux-users%[email protected]
>    3. mailto:[email protected]
>    4. https://groups.google.com/d/optout
>    5. mailto:tmux-users%[email protected]
>    6. mailto:[email protected]
>    7. 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.

Reply via email to