summaryrefslogtreecommitdiffstats
path: root/cmd-choose-session.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-12-22 15:25:07 +0000
committerTiago Cunha <tcunha@gmx.com>2010-12-22 15:25:07 +0000
commitb8eae3902b8586a575138289f9157a3dac46f92c (patch)
tree9cb8583926cf874875ffd7c245475831051203e1 /cmd-choose-session.c
parentd1bdc9a1614166aa8bee5163378d299a35c75a76 (diff)
Sync OpenBSD patchset 800:
Don't nuke the index counter when a session group comes up.
Diffstat (limited to 'cmd-choose-session.c')
-rw-r--r--cmd-choose-session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-choose-session.c b/cmd-choose-session.c
index 33b84080..9dabf58e 100644
--- a/cmd-choose-session.c
+++ b/cmd-choose-session.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-choose-session.c,v 1.15 2009-11-14 17:56:39 tcunha Exp $ */
+/* $Id: cmd-choose-session.c,v 1.16 2010-12-22 15:25:07 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -55,7 +55,7 @@ cmd_choose_session_exec(struct cmd *self, struct cmd_ctx *ctx)
struct winlink *wl;
struct session *s;
struct session_group *sg;
- u_int i, idx, cur;
+ u_int i, idx, sgidx, cur;
char tmp[64];
if (ctx->curclient == NULL) {
@@ -82,8 +82,8 @@ cmd_choose_session_exec(struct cmd *self, struct cmd_ctx *ctx)
if (sg == NULL)
*tmp = '\0';
else {
- idx = session_group_index(sg);
- xsnprintf(tmp, sizeof tmp, " (group %u)", idx);
+ sgidx = session_group_index(sg);
+ xsnprintf(tmp, sizeof tmp, " (group %u)", sgidx);
}
window_choose_add(wl->window->active, i,