=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/session.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- src/usr.bin/tmux/session.c 2022/10/17 10:59:42 1.93 +++ src/usr.bin/tmux/session.c 2023/07/19 13:03:36 1.94 @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.93 2022/10/17 10:59:42 nicm Exp $ */ +/* $OpenBSD: session.c,v 1.94 2023/07/19 13:03:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -739,9 +739,12 @@ 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. */