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

Diff for /src/usr.bin/tmux/layout.c between version 1.38 and 1.39

version 1.38, 2018/10/18 08:38:01 version 1.39, 2019/04/04 10:25:35
Line 722 
Line 722 
     enum layout_type type, int size)      enum layout_type type, int size)
 {  {
         struct layout_cell      *lcchild;          struct layout_cell      *lcchild;
         u_int                   new_size, available, previous, count, idx;          u_int                    new_size, available, previous, count, idx;
   
         /* Cells with no children must just be bigger than minimum. */          /* Cells with no children must just be bigger than minimum. */
         if (lc->type == LAYOUT_WINDOWPANE)          if (lc->type == LAYOUT_WINDOWPANE)
Line 736 
Line 736 
   
         /* Check new size will work for each child. */          /* Check new size will work for each child. */
         if (lc->type == type) {          if (lc->type == type) {
                   if (available < (count * 2) - 1)
                           return (0);
   
                 if (type == LAYOUT_LEFTRIGHT)                  if (type == LAYOUT_LEFTRIGHT)
                         previous = lc->sx;                          previous = lc->sx;
                 else                  else
Line 745 
Line 748 
                 TAILQ_FOREACH(lcchild, &lc->cells, entry) {                  TAILQ_FOREACH(lcchild, &lc->cells, entry) {
                         new_size = layout_new_pane_size(w, previous, lcchild,                          new_size = layout_new_pane_size(w, previous, lcchild,
                             type, size, count - idx, available);                              type, size, count - idx, available);
                         if (new_size > available)                          if (idx == count - 1) {
                                 return (0);                                  if (new_size > available)
                                           return (0);
                         available -= (new_size + 1);                                  available -= new_size;
                           } else {
                                   if (new_size + 1 > available)
                                           return (0);
                                   available -= new_size + 1;
                           }
                         if (!layout_set_size_check(w, lcchild, type, new_size))                          if (!layout_set_size_check(w, lcchild, type, new_size))
                                 return (0);                                  return (0);
   
                         idx++;                          idx++;
                 }                  }
         } else {          } else {

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39