summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-new-session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-05-29 23:02:28 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-05-29 23:02:28 +0000
commit42c994bba350504bdb9cda0cdaa004cda114ee22 (patch)
tree30274fff21426973b7cfc96aab29a0584d6d018f /usr.bin/tmux/cmd-new-session.c
parent54e214becb6475e80d8f55a674da1a50bf600424 (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 'usr.bin/tmux/cmd-new-session.c')
-rw-r--r--usr.bin/tmux/cmd-new-session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c
index f70f33bbae4..cfb355d3f83 100644
--- a/usr.bin/tmux/cmd-new-session.c
+++ b/usr.bin/tmux/cmd-new-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-new-session.c,v 1.65 2015/04/27 16:25:57 nicm Exp $ */
+/* $OpenBSD: cmd-new-session.c,v 1.66 2015/05/29 23:02:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);
}
/*