From a55e569af513deb99258354822ee75cbdce83619 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 29 May 2015 23:02:27 +0000 Subject: [PATCH] Use RB_MIN to get the lowest index for the current window when creating grouped sessions, rather than using RB_ROOT. --- cmd-new-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd-new-session.c b/cmd-new-session.c index 199e82c2..9c767489 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -254,7 +254,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq) if (groupwith != NULL) { session_group_add(groupwith, s); session_group_synchronize_to(s); - session_select(s, RB_ROOT(&s->windows)->idx); + session_select(s, RB_MIN(winlinks, &s->windows)->idx); } /*