diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-11-02 18:52:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-11-02 18:52:06 +0000 |
commit | 45ececc62b3e881ea76a09e9a305a470b5e8dedd (patch) | |
tree | 09e92b34f6116a01b158413be39d3dac7238054f /usr.bin/tmux | |
parent | 080b2623b686636593a98b127a2b317f300c2e8e (diff) |
Format for group list of "other sessions" is a bit weird, just list all
the sessions in the group.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/format.c | 13 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 4 | ||||
-rw-r--r-- | usr.bin/tmux/window-tree.c | 8 |
3 files changed, 10 insertions, 15 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index a64b735b097..9b310e9ee9e 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.149 2017/11/02 18:43:51 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.150 2017/11/02 18:52:05 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -577,9 +577,9 @@ format_cb_pane_tabs(struct format_tree *ft, struct format_entry *fe) evbuffer_free(buffer); } -/* Callback for session_group_others. */ +/* Callback for session_group_list. */ static void -format_cb_session_group_others(struct format_tree *ft, struct format_entry *fe) +format_cb_session_group_list(struct format_tree *ft, struct format_entry *fe) { struct session *s = ft->s; struct session_group *sg; @@ -595,9 +595,6 @@ format_cb_session_group_others(struct format_tree *ft, struct format_entry *fe) buffer = evbuffer_new(); TAILQ_FOREACH(loop, &sg->sessions, gentry) { - if (loop == s) - continue; - if (EVBUFFER_LENGTH(buffer) > 0) evbuffer_add(buffer, ",", 1); evbuffer_add_printf(buffer, "%s", loop->name); @@ -1290,8 +1287,8 @@ format_defaults_session(struct format_tree *ft, struct session *s) format_add(ft, "session_group", "%s", sg->name); format_add(ft, "session_group_size", "%u", session_group_count (sg)); - format_add_cb(ft, "session_group_others", - format_cb_session_group_others); + format_add_cb(ft, "session_group_list", + format_cb_session_group_list); } format_add_tv(ft, "session_created", &s->creation_time); diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 71738c2fd8a..9eeef827c8e 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.586 2017/11/02 18:27:35 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.587 2017/11/02 18:52:05 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> .\" @@ -3714,7 +3714,7 @@ The following variables are available, where appropriate: .It Li "session_last_attached" Ta "" Ta "Time session last attached" .It Li "session_group" Ta "" Ta "Name of session group" .It Li "session_group_size" Ta "" Ta "Size of session group" -.It Li "session_group_others" Ta "" Ta "List of other sessions in group" +.It Li "session_group_list" Ta "" Ta "List of sessions in group" .It Li "session_grouped" Ta "" Ta "1 if session in a group" .It Li "session_height" Ta "" Ta "Height of session" .It Li "session_id" Ta "" Ta "Unique session ID" diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c index f696dd75189..244d6e92961 100644 --- a/usr.bin/tmux/window-tree.c +++ b/usr.bin/tmux/window-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-tree.c,v 1.24 2017/11/02 18:43:51 nicm Exp $ */ +/* $OpenBSD: window-tree.c,v 1.25 2017/11/02 18:52:05 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -44,10 +44,8 @@ static void window_tree_key(struct window_pane *, "," \ "#{session_windows} windows" \ "#{?session_grouped, " \ - "(group #{session_group}" \ - "#{?session_group_others," \ - " with #{session_group_others}," \ - "})," \ + "(group #{session_group}: " \ + "#{session_group_list})," \ "}" \ "#{?session_attached, (attached),}" \ "}" \ |