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

Diff for /src/usr.bin/tmux/cmd-find.c between version 1.13 and 1.14

version 1.13, 2015/09/14 13:22:02 version 1.14, 2015/10/22 11:23:00
Line 255 
Line 255 
                 wp = NULL;                  wp = NULL;
   
         /* Not running in a pane. We know nothing. Find the best session. */          /* Not running in a pane. We know nothing. Find the best session. */
         if (wp == NULL) {          if (wp == NULL)
                 fs->s = cmd_find_best_session(NULL, 0, fs->flags);                  goto unknown_pane;
                 if (fs->s == NULL)  
                         return (-1);  
                 fs->wl = fs->s->curw;  
                 fs->idx = fs->wl->idx;  
                 fs->w = fs->wl->window;  
                 fs->wp = fs->w->active;  
                 return (0);  
         }  
   
         /* We now know the window and pane. */          /* We now know the window and pane. */
         fs->w = wp->window;          fs->w = wp->window;
         fs->wp = wp;          fs->wp = wp;
   
         /* Find the best session and winlink. */          /* Find the best session and winlink. */
         if (cmd_find_best_session_with_window(fs) != 0)          if (cmd_find_best_session_with_window(fs) != 0) {
                   if (wp != NULL) {
                           /*
                            * The window may have been destroyed but the pane
                            * still on all_window_panes due to something else
                            * holding a reference.
                            */
                           goto unknown_pane;
                   }
                 return (-1);                  return (-1);
           }
           return (0);
   
   unknown_pane:
           fs->s = cmd_find_best_session(NULL, 0, fs->flags);
           if (fs->s == NULL)
                   return (-1);
           fs->wl = fs->s->curw;
           fs->idx = fs->wl->idx;
           fs->w = fs->wl->window;
           fs->wp = fs->w->active;
         return (0);          return (0);
 }  }
   

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14