mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23:38:48 +00:00
Format for group list of "other sessions" is a bit weird, just list all
the sessions in the group.
This commit is contained in:
parent
95850e1aca
commit
17655e5ba6
11
format.c
11
format.c
@ -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);
|
||||
|
2
tmux.1
2
tmux.1
@ -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"
|
||||
|
@ -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),}" \
|
||||
"}" \
|
||||
|
Loading…
Reference in New Issue
Block a user