Set visited flag on last windows when linking session.
authornicm <nicm@openbsd.org>
Sat, 2 Sep 2023 08:38:37 +0000 (08:38 +0000)
committernicm <nicm@openbsd.org>
Sat, 2 Sep 2023 08:38:37 +0000 (08:38 +0000)
usr.bin/tmux/session.c

index 6884939..548d11c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.95 2023/09/01 13:48:54 nicm Exp $ */
+/* $OpenBSD: session.c,v 1.96 2023/09/02 08:38:37 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -687,8 +687,10 @@ session_group_synchronize1(struct session *target, struct session *s)
        TAILQ_INIT(&s->lastw);
        TAILQ_FOREACH(wl, &old_lastw, sentry) {
                wl2 = winlink_find_by_index(&s->windows, wl->idx);
-               if (wl2 != NULL)
+               if (wl2 != NULL) {
                        TAILQ_INSERT_TAIL(&s->lastw, wl2, sentry);
+                       wl2->flags |= WINLINK_VISITED;
+               }
        }
 
        /* Then free the old winlinks list. */