summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-02-09 15:04:54 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-02-09 15:04:54 +0000
commitdb7e392b45e8f2dbbe7184dbe24a4b3c4600c1b0 (patch)
tree8eb075d2ec1c2599e06f29c698b7437075602ba9 /usr.bin/tmux/server-fn.c
parente3097dffa34ae8d4bc2eeb7037c01eb03dad78af (diff)
Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one session.
Diffstat (limited to 'usr.bin/tmux/server-fn.c')
-rw-r--r--usr.bin/tmux/server-fn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c
index 03d409c6504..f769019f47c 100644
--- a/usr.bin/tmux/server-fn.c
+++ b/usr.bin/tmux/server-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.103 2017/01/13 11:56:43 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.104 2017/02/09 15:04:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -78,7 +78,7 @@ server_redraw_session_group(struct session *s)
{
struct session_group *sg;
- if ((sg = session_group_find(s)) == NULL)
+ if ((sg = session_group_contains(s)) == NULL)
server_redraw_session(s);
else {
TAILQ_FOREACH(s, &sg->sessions, gentry)
@@ -102,7 +102,7 @@ server_status_session_group(struct session *s)
{
struct session_group *sg;
- if ((sg = session_group_find(s)) == NULL)
+ if ((sg = session_group_contains(s)) == NULL)
server_status_session(s);
else {
TAILQ_FOREACH(s, &sg->sessions, gentry)
@@ -220,7 +220,7 @@ server_kill_window(struct window *w)
}
if (options_get_number(s->options, "renumber-windows")) {
- if ((sg = session_group_find(s)) != NULL) {
+ if ((sg = session_group_contains(s)) != NULL) {
TAILQ_FOREACH(target_s, &sg->sessions, gentry)
session_renumber_windows(target_s);
} else
@@ -238,8 +238,8 @@ server_link_window(struct session *src, struct winlink *srcwl,
struct winlink *dstwl;
struct session_group *srcsg, *dstsg;
- srcsg = session_group_find(src);
- dstsg = session_group_find(dst);
+ srcsg = session_group_contains(src);
+ dstsg = session_group_contains(dst);
if (src != dst && srcsg != NULL && dstsg != NULL && srcsg == dstsg) {
xasprintf(cause, "sessions are grouped");
return (-1);
@@ -348,7 +348,7 @@ server_destroy_session_group(struct session *s)
struct session_group *sg;
struct session *s1;
- if ((sg = session_group_find(s)) == NULL)
+ if ((sg = session_group_contains(s)) == NULL)
server_destroy_session(s);
else {
TAILQ_FOREACH_SAFE(s, &sg->sessions, gentry, s1) {