From b13c2307497c1d905c07e7c21cd78b2c223fa4ee Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 19 Jul 2023 13:03:36 +0000 Subject: [PATCH] Correct visited flag when the last window list is rebuilt by renumbering windows, appears to fix hang reported by Mark Kelly. --- session.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/session.c b/session.c index c9a98d23..de3f336f 100644 --- a/session.c +++ b/session.c @@ -739,9 +739,12 @@ session_renumber_windows(struct session *s) memcpy(&old_lastw, &s->lastw, sizeof old_lastw); TAILQ_INIT(&s->lastw); TAILQ_FOREACH(wl, &old_lastw, sentry) { + wl->flags &= ~WINLINK_VISITED; wl_new = winlink_find_by_window(&s->windows, wl->window); - if (wl_new != NULL) + if (wl_new != NULL) { TAILQ_INSERT_TAIL(&s->lastw, wl_new, sentry); + wl_new->flags |= WINLINK_VISITED; + } } /* Set the current window. */