summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2023-07-19 13:03:36 +0000
committernicm <nicm>2023-07-19 13:03:36 +0000
commitb13c2307497c1d905c07e7c21cd78b2c223fa4ee (patch)
tree6d94699a1711defd41aaf44a4dad382cfd04bda3
parent2f74e811f12a3d5d2e61789dbd184a23849e8cce (diff)
Correct visited flag when the last window list is rebuilt by renumbering
windows, appears to fix hang reported by Mark Kelly.
-rw-r--r--session.c5
1 files changed, 4 insertions, 1 deletions
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. */