From: nicm Date: Fri, 29 May 2015 23:02:27 +0000 (+0000) Subject: Use RB_MIN to get the lowest index for the current window when creating X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=58c1759dec3b8ea7741cf569bb457ce84e10780f;p=openbsd Use RB_MIN to get the lowest index for the current window when creating grouped sessions, rather than using RB_ROOT. --- 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 @@ -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); } /*