version 1.7, 2010/12/08 19:57:03 |
version 1.8, 2010/12/19 18:35:08 |
|
|
{ |
{ |
struct window_pane *wp; |
struct window_pane *wp; |
struct layout_cell *lc, *lcmain, *lcrow, *lcchild; |
struct layout_cell *lc, *lcmain, *lcrow, *lcchild; |
u_int n, mainheight, width, height, used; |
u_int n, mainheight, otherheight, width, height; |
u_int i, j, columns, rows, totalrows; |
u_int used, i, j, columns, rows, totalrows; |
|
|
layout_print_cell(w->layout_root, __func__, 1); |
layout_print_cell(w->layout_root, __func__, 1); |
|
|
|
|
|
|
/* Get the main pane height and add one for separator line. */ |
/* Get the main pane height and add one for separator line. */ |
mainheight = options_get_number(&w->options, "main-pane-height") + 1; |
mainheight = options_get_number(&w->options, "main-pane-height") + 1; |
|
|
|
/* Get the optional other pane height and add one for separator line. */ |
|
otherheight = options_get_number(&w->options, "other-pane-height") + 1; |
|
|
|
/* |
|
* If an other pane height was specified, honour it so long as it |
|
* doesn't shrink the main height to less than the main-pane-height |
|
*/ |
|
if (otherheight > 1 && w->sx - otherheight > mainheight) |
|
mainheight = w->sx - otherheight; |
if (mainheight < PANE_MINIMUM + 1) |
if (mainheight < PANE_MINIMUM + 1) |
mainheight = PANE_MINIMUM + 1; |
mainheight = PANE_MINIMUM + 1; |
|
|
|
|
{ |
{ |
struct window_pane *wp; |
struct window_pane *wp; |
struct layout_cell *lc, *lcmain, *lccolumn, *lcchild; |
struct layout_cell *lc, *lcmain, *lccolumn, *lcchild; |
u_int n, mainwidth, width, height, used; |
u_int n, mainwidth, otherwidth, width, height; |
u_int i, j, columns, rows, totalcolumns; |
u_int used, i, j, columns, rows, totalcolumns; |
|
|
layout_print_cell(w->layout_root, __func__, 1); |
layout_print_cell(w->layout_root, __func__, 1); |
|
|
|
|
|
|
/* Get the main pane width and add one for separator line. */ |
/* Get the main pane width and add one for separator line. */ |
mainwidth = options_get_number(&w->options, "main-pane-width") + 1; |
mainwidth = options_get_number(&w->options, "main-pane-width") + 1; |
|
|
|
/* Get the optional other pane width and add one for separator line. */ |
|
otherwidth = options_get_number(&w->options, "other-pane-width") + 1; |
|
|
|
/* |
|
* If an other pane width was specified, honour it so long as it |
|
* doesn't shrink the main width to less than the main-pane-width |
|
*/ |
|
if (otherwidth > 1 && w->sx - otherwidth > mainwidth) |
|
mainwidth = w->sx - otherwidth; |
if (mainwidth < PANE_MINIMUM + 1) |
if (mainwidth < PANE_MINIMUM + 1) |
mainwidth = PANE_MINIMUM + 1; |
mainwidth = PANE_MINIMUM + 1; |
|
|