diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-01-23 21:07:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-01-23 21:07:31 +0000 |
commit | b9ade6e6bb54538dd1164e3a16d261b6580ba4a9 (patch) | |
tree | 3b8de7e513d176e8b8540ba9669d0af4bf9bee9e | |
parent | c0d3e4315c4465d2c665ab2a9151ac31e72f6882 (diff) | |
download | rtmux-b9ade6e6bb54538dd1164e3a16d261b6580ba4a9.tar.gz rtmux-b9ade6e6bb54538dd1164e3a16d261b6580ba4a9.tar.bz2 rtmux-b9ade6e6bb54538dd1164e3a16d261b6580ba4a9.zip |
When a window is destroyed, remove all links to it from each session rather
than just the first. Reported by Robin Lee Powell.
-rw-r--r-- | server-fn.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server-fn.c b/server-fn.c index ce5e518d..3c7277bd 100644 --- a/server-fn.c +++ b/server-fn.c @@ -260,13 +260,13 @@ server_kill_window(struct window *w) s = ARRAY_ITEM(&sessions, i); if (s == NULL || !session_has(s, w)) continue; - if ((wl = winlink_find_by_window(&s->windows, w)) == NULL) - continue; - - if (session_detach(s, wl)) - server_destroy_session_group(s); - else - server_redraw_session_group(s); + while ((wl = winlink_find_by_window(&s->windows, w)) != NULL) { + if (session_detach(s, wl)) { + server_destroy_session_group(s); + break; + } else + server_redraw_session_group(s); + } } } |