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

Diff for /src/usr.bin/tmux/session.c between version 1.36 and 1.37

version 1.36, 2012/07/10 11:53:01 version 1.37, 2013/03/22 16:00:26
Line 346 
Line 346 
                 if (alert && ((wl = session_next_alert(wl)) == NULL))                  if (alert && ((wl = session_next_alert(wl)) == NULL))
                         return (-1);                          return (-1);
         }          }
         if (wl == s->curw)          return (session_set_current(s, wl));
                 return (1);  
         winlink_stack_remove(&s->lastw, wl);  
         winlink_stack_push(&s->lastw, s->curw);  
         s->curw = wl;  
         winlink_clear_flags(wl);  
         return (0);  
 }  }
   
 struct winlink *  struct winlink *
Line 383 
Line 377 
                 if (alert && (wl = session_previous_alert(wl)) == NULL)                  if (alert && (wl = session_previous_alert(wl)) == NULL)
                         return (-1);                          return (-1);
         }          }
         if (wl == s->curw)          return (session_set_current(s, wl));
                 return (1);  
         winlink_stack_remove(&s->lastw, wl);  
         winlink_stack_push(&s->lastw, s->curw);  
         s->curw = wl;  
         winlink_clear_flags(wl);  
         return (0);  
 }  }
   
 /* Move session to specific window. */  /* Move session to specific window. */
Line 399 
Line 387 
         struct winlink  *wl;          struct winlink  *wl;
   
         wl = winlink_find_by_index(&s->windows, idx);          wl = winlink_find_by_index(&s->windows, idx);
         if (wl == NULL)          return (session_set_current(s, wl));
                 return (-1);  
         if (wl == s->curw)  
                 return (1);  
         winlink_stack_remove(&s->lastw, wl);  
         winlink_stack_push(&s->lastw, s->curw);  
         s->curw = wl;  
         winlink_clear_flags(wl);  
         return (0);  
 }  }
   
 /* Move session to last used window. */  /* Move session to last used window. */
Line 417 
Line 397 
         struct winlink  *wl;          struct winlink  *wl;
   
         wl = TAILQ_FIRST(&s->lastw);          wl = TAILQ_FIRST(&s->lastw);
           if (wl == NULL)
                   return (-1);
           if (wl == s->curw)
                   return (1);
   
           return (session_set_current(s, wl));
   }
   
   /* Set current winlink to wl .*/
   int
   session_set_current(struct session *s, struct winlink *wl)
   {
         if (wl == NULL)          if (wl == NULL)
                 return (-1);                  return (-1);
         if (wl == s->curw)          if (wl == s->curw)

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37