[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.43 and 1.44

version 1.43, 2019/04/23 09:15:24 version 1.44, 2019/06/26 13:03:47
Line 232 
Line 232 
  * case for the most upper panes only.   * case for the most upper panes only.
  */   */
 static int  static int
 layout_need_status(struct layout_cell *lc, int at_top)  layout_need_status(struct layout_cell *lc, int status)
 {  {
         struct layout_cell      *first_lc;          struct layout_cell      *next;
   
         if (lc->parent != NULL) {          if (lc->parent != NULL) {
                 if (lc->parent->type == LAYOUT_LEFTRIGHT)                  if (lc->parent->type == LAYOUT_LEFTRIGHT)
                         return (layout_need_status(lc->parent, at_top));                          return (layout_need_status(lc->parent, status));
   
                 if (at_top)                  if (status == PANE_STATUS_TOP)
                         first_lc = TAILQ_FIRST(&lc->parent->cells);                          next = TAILQ_FIRST(&lc->parent->cells);
                 else                  else
                         first_lc = TAILQ_LAST(&lc->parent->cells,layout_cells);                          next = TAILQ_LAST(&lc->parent->cells,layout_cells);
                 if (lc == first_lc)                  if (lc == next)
                         return (layout_need_status(lc->parent, at_top));                          return (layout_need_status(lc->parent, status));
                 return (0);                  return (0);
         }          }
         return (1);          return (1);
Line 264 
Line 264 
                 if ((lc = wp->layout_cell) == NULL)                  if ((lc = wp->layout_cell) == NULL)
                         continue;                          continue;
   
                 if (status != 0)                  if (status != PANE_STATUS_OFF)
                         shift = layout_need_status(lc, status == 1);                          shift = layout_need_status(lc, status);
                 else                  else
                         shift = 0;                          shift = 0;
   
Line 317 
Line 317 
                         available = lc->sx;                          available = lc->sx;
                 else {                  else {
                         available = lc->sy;                          available = lc->sy;
                         if (status != 0)                          if (status != PANE_STATUS_OFF)
                                 minimum += layout_need_status(lc, status == 1);                                  minimum += layout_need_status(lc, status);
                 }                  }
                 if (available > minimum)                  if (available > minimum)
                         available -= minimum;                          available -= minimum;
Line 862 
Line 862 
                 break;                  break;
         case LAYOUT_TOPBOTTOM:          case LAYOUT_TOPBOTTOM:
                 minimum = PANE_MINIMUM * 2 + 1;                  minimum = PANE_MINIMUM * 2 + 1;
                 if (status != 0)                  if (status != PANE_STATUS_OFF)
                         minimum += layout_need_status(lc, status == 1);                          minimum += layout_need_status(lc, status);
                 if (sy < minimum)                  if (sy < minimum)
                         return (NULL);                          return (NULL);
                 break;                  break;
Line 1030 
Line 1030 
                 size = parent->sx;                  size = parent->sx;
         else if (parent->type == LAYOUT_TOPBOTTOM) {          else if (parent->type == LAYOUT_TOPBOTTOM) {
                 size = parent->sy;                  size = parent->sy;
                 if (status != 0)                  if (status != PANE_STATUS_OFF)
                         size -= layout_need_status(parent, status == 1);                          size -= layout_need_status(parent, status);
         } else          } else
                 return (0);                  return (0);
         if (size < number - 1)          if (size < number - 1)
Line 1050 
Line 1050 
                         layout_resize_adjust(w, lc, LAYOUT_LEFTRIGHT, change);                          layout_resize_adjust(w, lc, LAYOUT_LEFTRIGHT, change);
                 } else if (parent->type == LAYOUT_TOPBOTTOM) {                  } else if (parent->type == LAYOUT_TOPBOTTOM) {
                         this = each;                          this = each;
                         if (status != 0)                          if (status != PANE_STATUS_OFF)
                                 this += layout_need_status(lc, status == 1);                                  this += layout_need_status(lc, status);
                         change = this - (int)lc->sy;                          change = this - (int)lc->sy;
                         layout_resize_adjust(w, lc, LAYOUT_TOPBOTTOM, change);                          layout_resize_adjust(w, lc, LAYOUT_TOPBOTTOM, change);
                 }                  }

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44