[BACK]Return to cmd-choose-session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/Attic/cmd-choose-session.c between version 1.10 and 1.11

version 1.10, 2010/12/19 22:35:54 version 1.11, 2010/12/21 22:37:59
Line 55 
Line 55 
         struct winlink                  *wl;          struct winlink                  *wl;
         struct session                  *s;          struct session                  *s;
         struct session_group            *sg;          struct session_group            *sg;
         u_int                            i, idx, sgidx, cur;          u_int                            idx, sgidx, cur;
         char                             tmp[64];          char                             tmp[64];
   
         if (ctx->curclient == NULL) {          if (ctx->curclient == NULL) {
Line 70 
Line 70 
                 return (0);                  return (0);
   
         cur = idx = 0;          cur = idx = 0;
         for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {          RB_FOREACH(s, sessions, &sessions) {
                 s = ARRAY_ITEM(&sessions, i);  
                 if (s == NULL)  
                         continue;  
                 if (s == ctx->curclient->session)                  if (s == ctx->curclient->session)
                         cur = idx;                          cur = idx;
                 idx++;                  idx++;
Line 86 
Line 83 
                         xsnprintf(tmp, sizeof tmp, " (group %u)", sgidx);                          xsnprintf(tmp, sizeof tmp, " (group %u)", sgidx);
                 }                  }
   
                 window_choose_add(wl->window->active, i,                  window_choose_add(wl->window->active, s->idx,
                     "%s: %u windows [%ux%u]%s%s", s->name,                      "%s: %u windows [%ux%u]%s%s", s->name,
                     winlink_count(&s->windows), s->sx, s->sy,                      winlink_count(&s->windows), s->sx, s->sy,
                     tmp, s->flags & SESSION_UNATTACHED ? "" : " (attached)");                      tmp, s->flags & SESSION_UNATTACHED ? "" : " (attached)");
Line 120 
Line 117 
         if (cdata->client->flags & CLIENT_DEAD)          if (cdata->client->flags & CLIENT_DEAD)
                 return;                  return;
   
         if ((u_int) idx > ARRAY_LENGTH(&sessions) - 1)          s = session_find_by_index(idx);
                 return;  
         s = ARRAY_ITEM(&sessions, idx);  
         if (s == NULL)          if (s == NULL)
                 return;                  return;
         template = cmd_template_replace(cdata->template, s->name, 1);          template = cmd_template_replace(cdata->template, s->name, 1);

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11