mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Make session_has return a flag, returning the first winlink found is a
recipe for errors.
This commit is contained in:
@ -309,16 +309,16 @@ session_detach(struct session *s, struct winlink *wl)
|
||||
}
|
||||
|
||||
/* Return if session has window. */
|
||||
struct winlink *
|
||||
int
|
||||
session_has(struct session *s, struct window *w)
|
||||
{
|
||||
struct winlink *wl;
|
||||
|
||||
RB_FOREACH(wl, winlinks, &s->windows) {
|
||||
if (wl->window == w)
|
||||
return (wl);
|
||||
return (1);
|
||||
}
|
||||
return (NULL);
|
||||
return (0);
|
||||
}
|
||||
|
||||
struct winlink *
|
||||
|
Reference in New Issue
Block a user