diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-12-19 22:35:55 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-12-19 22:35:55 +0000 |
commit | 800292242d3df928fc9ef7c737d4ff560246df27 (patch) | |
tree | aa5e09904ad611f0ebb5e5b6d86a99f1be6737b4 | |
parent | 1a96fff2a5eee97204c2572c384f3a23dc411c4a (diff) |
Don't nuke the index counter when a session group comes up.
-rw-r--r-- | usr.bin/tmux/cmd-choose-session.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-choose-session.c b/usr.bin/tmux/cmd-choose-session.c index 7f0d502d2c5..8456a99769c 100644 --- a/usr.bin/tmux/cmd-choose-session.c +++ b/usr.bin/tmux/cmd-choose-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-choose-session.c,v 1.9 2009/11/13 19:53:28 nicm Exp $ */ +/* $OpenBSD: cmd-choose-session.c,v 1.10 2010/12/19 22:35:54 nicm 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, |