diff options
author | 2009-12-22 10:20:08 +0000 | |
---|---|---|
committer | 2009-12-22 10:20:08 +0000 | |
commit | d2c171611e41fbe857f2999639249b0ccdef4b90 (patch) | |
tree | 4cfb41fb0d8c44ad1d481dab8030cda968bc14ba /usr.bin/tmux/session.c | |
parent | treat the front headphone jack more like a built-in speaker. make it's (diff) | |
download | wireguard-openbsd-d2c171611e41fbe857f2999639249b0ccdef4b90.tar.xz wireguard-openbsd-d2c171611e41fbe857f2999639249b0ccdef4b90.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 'usr.bin/tmux/session.c')
-rw-r--r-- | usr.bin/tmux/session.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c index 4890ef8d1c5..f52530879ab 100644 --- a/usr.bin/tmux/session.c +++ b/usr.bin/tmux/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.15 2009/12/03 22:50:10 nicm Exp $ */ +/* $OpenBSD: session.c,v 1.16 2009/12/22 10:20:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |