diff options
author | nicm <nicm> | 2023-07-19 13:03:36 +0000 |
---|---|---|
committer | nicm <nicm> | 2023-07-19 13:03:36 +0000 |
commit | b13c2307497c1d905c07e7c21cd78b2c223fa4ee (patch) | |
tree | 6d94699a1711defd41aaf44a4dad382cfd04bda3 | |
parent | 2f74e811f12a3d5d2e61789dbd184a23849e8cce (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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. */ |