[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.30 and 1.31

version 1.30, 2016/01/19 15:59:12 version 1.31, 2016/01/19 16:01:30
Line 923 
Line 923 
         return (0);          return (0);
 }  }
   
   /* Find current state. */
   int
   cmd_find_current(struct cmd_find_state *fs, struct cmd_q *cmdq, int flags)
   {
           cmd_find_clear_state(fs, cmdq, flags);
           if (cmd_find_current_session(fs) != 0) {
                   if (~flags & CMD_FIND_QUIET)
                           cmdq_error(cmdq, "no current session");
                   return (-1);
           }
           return (0);
   }
   
 /*  /*
  * Split target into pieces and resolve for the given type. Fills in the given   * Split target into pieces and resolve for the given type. Fills in the given
  * state. Returns 0 on success or -1 on error.   * state. Returns 0 on success or -1 on error.
  */   */
 int  int
 cmd_find_target(struct cmd_find_state *fs, struct cmd_q *cmdq,  cmd_find_target(struct cmd_find_state *fs, struct cmd_find_state *current,
     const char *target, enum cmd_find_type type, int flags)      struct cmd_q *cmdq, const char *target, enum cmd_find_type type, int flags)
 {  {
         struct cmd_find_state    current;  
         struct mouse_event      *m;          struct mouse_event      *m;
         char                    *colon, *period, *copy = NULL;          char                    *colon, *period, *copy = NULL;
         const char              *session, *window, *pane;          const char              *session, *window, *pane;
Line 951 
Line 963 
                 fs->current = &marked_pane;                  fs->current = &marked_pane;
         else if (cmd_find_valid_state(&cmdq->current))          else if (cmd_find_valid_state(&cmdq->current))
                 fs->current = &cmdq->current;                  fs->current = &cmdq->current;
         else {          else
                 cmd_find_clear_state(&current, cmdq, flags);                  fs->current = current;
                 if (cmd_find_current_session(&current) != 0) {  
                         if (~flags & CMD_FIND_QUIET)  
                                 cmdq_error(cmdq, "no current session");  
                         goto error;  
                 }  
                 fs->current = &current;  
         }  
   
         /* An empty or NULL target is the current. */          /* An empty or NULL target is the current. */
         if (target == NULL || *target == '\0')          if (target == NULL || *target == '\0')

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31