diff options
author | nicm <nicm> | 2016-10-15 00:12:58 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-15 00:12:58 +0000 |
commit | 3f138dc40c37ddee021b92e5d29676ed96b6cab8 (patch) | |
tree | efbe5f7d5c6ff93b807629f3257fb424094eb8c8 /session.c | |
parent | 63b2547a0255c42bff405ca34577de240a99b736 (diff) | |
download | rtmux-3f138dc40c37ddee021b92e5d29676ed96b6cab8.tar.gz rtmux-3f138dc40c37ddee021b92e5d29676ed96b6cab8.tar.bz2 rtmux-3f138dc40c37ddee021b92e5d29676ed96b6cab8.zip |
Rename a function for consistency and some spacing nits.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -211,6 +211,7 @@ session_destroy(struct session *s) struct winlink *wl; log_debug("session %s destroyed", s->name); + s->curw = NULL; RB_REMOVE(sessions, &sessions, s); notify_session_closed(s); @@ -385,14 +386,17 @@ int session_detach(struct session *s, struct winlink *wl) { if (s->curw == wl && - session_last(s) != 0 && session_previous(s, 0) != 0) + session_last(s) != 0 && + session_previous(s, 0) != 0) session_next(s, 0); wl->flags &= ~WINLINK_ALERTFLAGS; notify_window_unlinked(s, wl->window); winlink_stack_remove(&s->lastw, wl); winlink_remove(&s->windows, wl); + session_group_synchronize_from(s); + if (RB_EMPTY(&s->windows)) { session_destroy(s); return (1); |