From f81b3ddf94c9f593bc37cd79528fcca42697ce1b Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sat, 26 Dec 2009 23:45:21 +0000 Subject: Sync OpenBSD patchset 591: Fix a couple of problems with grouped sessions reported by danh: redraw properly and choose the correct last window after a window is killed. --- session.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'session.c') diff --git a/session.c b/session.c index 625a82d6..fc9d8500 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $Id: session.c,v 1.73 2009-12-04 22:14:47 tcunha Exp $ */ +/* $Id: session.c,v 1.74 2009-12-26 23:45:21 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -548,10 +548,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); -- cgit