summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authornicm <nicm>2015-05-29 23:02:27 +0000
committernicm <nicm>2015-05-29 23:02:27 +0000
commita55e569af513deb99258354822ee75cbdce83619 (patch)
tree7ee72b103d6a0053985c805512e84e0755d51cfd /cmd-new-session.c
parent379400cfa69f8df9ac13b070c60d5f8a282ddf6e (diff)
Use RB_MIN to get the lowest index for the current window when creating
grouped sessions, rather than using RB_ROOT.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/*