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

Diff for /src/usr.bin/tmux/cmd-attach-session.c between version 1.28 and 1.29

version 1.28, 2013/10/10 12:28:08 version 1.29, 2014/01/09 14:20:55
Line 47 
Line 47 
 {  {
         struct session          *s;          struct session          *s;
         struct client           *c;          struct client           *c;
           struct winlink          *wl = NULL;
           struct window           *w = NULL;
           struct window_pane      *wp = NULL;
         const char              *update;          const char              *update;
         char                    *cause;          char                    *cause;
         u_int                    i;          u_int                    i;
Line 59 
Line 62 
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
   
         if ((s = cmd_find_session(cmdq, tflag, 1)) == NULL)          if (tflag == NULL) {
                 return (CMD_RETURN_ERROR);                  if ((s = cmd_find_session(cmdq, tflag, 1)) == NULL)
                           return (CMD_RETURN_ERROR);
           } else if (tflag[strcspn(tflag, ":.")] != '\0') {
                   if ((wl = cmd_find_pane(cmdq, tflag, &s, &wp)) == NULL)
                           return (CMD_RETURN_ERROR);
           } else {
                   if ((s = cmd_find_session(cmdq, tflag, 1)) == NULL)
                           return (CMD_RETURN_ERROR);
                   w = cmd_lookup_windowid(tflag);
                   if (w == NULL && (wp = cmd_lookup_paneid(tflag)) != NULL)
                           w = wp->window;
                   if (w != NULL)
                           wl = winlink_find_by_window(&s->windows, w);
           }
   
         if (cmdq->client == NULL)          if (cmdq->client == NULL)
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
   
           if (wl != NULL) {
                   if (wp != NULL)
                           window_set_active_pane(wp->window, wp);
                   session_set_current(s, wl);
           }
   
         if (cmdq->client->session != NULL) {          if (cmdq->client->session != NULL) {
                 if (dflag) {                  if (dflag) {

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29