diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-12-22 10:20:08 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-12-22 10:20:08 +0000 |
commit | 4feee126b86d59e29886407cd5c534b6e1cb2ba1 (patch) | |
tree | 0bdff95c783b5f7a9c329e2a685a8f6a65c56894 /session.c | |
parent | 19ea306606b6386ea457838353e1aea759d47f19 (diff) | |
download | rtmux-4feee126b86d59e29886407cd5c534b6e1cb2ba1.tar.gz rtmux-4feee126b86d59e29886407cd5c534b6e1cb2ba1.tar.bz2 rtmux-4feee126b86d59e29886407cd5c534b6e1cb2ba1.zip |
Fix a couple of problems with grouped sessions reported by danh: redraw
properly and choose the correct last window after a window is killed.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -549,10 +549,10 @@ session_group_synchronize1(struct session *target, struct session *s) return; /* If the current window has vanished, move to the next now. */ - if (s->curw != NULL) { - while (winlink_find_by_index(ww, s->curw->idx) == NULL) - session_next(s, 0); - } + if (s->curw != NULL && + winlink_find_by_index(ww, s->curw->idx) == NULL && + session_last(s) != 0 && session_previous(s, 0) != 0) + session_next(s, 0); /* Save the old pointer and reset it. */ memcpy(&old_windows, &s->windows, sizeof old_windows); |