summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-10-10 10:02:48 +0000
committernicm <nicm@openbsd.org>2009-10-10 10:02:48 +0000
commit01b2421e04cbfd153be5c6642d40c8f87c09f4c5 (patch)
treec4fa5b75121b64ed84165f58352a2776ecbcbfc4 /usr.bin/tmux/window.c
parentWe don't need independent file reader and writer anymore. So, (diff)
downloadwireguard-openbsd-01b2421e04cbfd153be5c6642d40c8f87c09f4c5.tar.xz
wireguard-openbsd-01b2421e04cbfd153be5c6642d40c8f87c09f4c5.zip
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.c10
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;
}
}