[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.23 and 1.24

version 1.23, 2015/12/15 00:00:01 version 1.24, 2015/12/15 00:11:24
Line 873 
Line 873 
                 log_debug("%s: target %s, type %d", __func__, target, type);                  log_debug("%s: target %s, type %d", __func__, target, type);
         log_debug("%s: cmdq %p, flags %#x", __func__, cmdq, flags);          log_debug("%s: cmdq %p, flags %#x", __func__, cmdq, flags);
   
           /* Clear new state. */
           cmd_find_clear_state(fs, cmdq, flags);
   
         /* Find current state. */          /* Find current state. */
         cmd_find_clear_state(&current, cmdq, flags);          fs->current = NULL;
         if (server_check_marked() && (flags & CMD_FIND_DEFAULT_MARKED))          if (server_check_marked() && (flags & CMD_FIND_DEFAULT_MARKED))
                 cmd_find_copy_state(&current, &marked_pane);                  fs->current = &marked_pane;
         else {          if (fs->current == NULL) {
                   cmd_find_clear_state(&current, cmdq, flags);
                 if (cmd_find_current_session(&current) != 0) {                  if (cmd_find_current_session(&current) != 0) {
                         if (~flags & CMD_FIND_QUIET)                          if (~flags & CMD_FIND_QUIET)
                                 cmdq_error(cmdq, "no current session");                                  cmdq_error(cmdq, "no current session");
                         goto error;                          goto error;
                 }                  }
                   fs->current = &current;
         }          }
   
         /* Clear new state. */  
         cmd_find_clear_state(fs, cmdq, flags);  
         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')
                 goto current;                  goto current;
Line 1087 
Line 1088 
   
 current:  current:
         /* Use the current session. */          /* Use the current session. */
           cmd_find_copy_state(fs, fs->current);
         if (flags & CMD_FIND_WINDOW_INDEX)          if (flags & CMD_FIND_WINDOW_INDEX)
                 current.idx = -1;                  fs->idx = -1;
         memcpy(fs, &current, sizeof *fs);  
         goto found;          goto found;
   
 error:  error:

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24