From 1a7d94b31f73fd2780347ed40c36a275984d82f5 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 10 Oct 2009 10:02:49 +0000 Subject: Add "grouped sessions" which have independent name, options, current window and so on but where the linked windows are synchronized (ie creating, killing windows and so on are mirrored between the sessions). A grouped session may be created by passing -t to new-session. Had this around for a while, tested by a couple of people. --- usr.bin/tmux/window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.bin/tmux/window.c') diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 9521b230d87..b80cec3aed3 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.27 2009/10/09 07:27:00 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.28 2009/10/10 10:02:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -174,7 +174,7 @@ winlink_stack_push(struct winlink_stack *stack, struct winlink *wl) return; winlink_stack_remove(stack, wl); - SLIST_INSERT_HEAD(stack, wl, sentry); + TAILQ_INSERT_HEAD(stack, wl, sentry); } void @@ -184,10 +184,10 @@ winlink_stack_remove(struct winlink_stack *stack, struct winlink *wl) if (wl == NULL) return; - - SLIST_FOREACH(wl2, stack, sentry) { + + TAILQ_FOREACH(wl2, stack, sentry) { if (wl2 == wl) { - SLIST_REMOVE(stack, wl, winlink, sentry); + TAILQ_REMOVE(stack, wl, sentry); return; } } -- cgit v1.2.3