diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-10 10:02:49 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-10 10:02:49 +0000 |
commit | 1a7d94b31f73fd2780347ed40c36a275984d82f5 (patch) | |
tree | c75a5b36b46e37774308415dee9f0d21d80cf252 /usr.bin/tmux/window.c | |
parent | 930bee8dee77f0a986fac1edcc836ff0d62c5165 (diff) |
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.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r-- | usr.bin/tmux/window.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 <nicm@users.sourceforge.net> @@ -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; } } |