Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26504
Modified Files:
cmd-set-option.c layout-set.c tmux.1 tmux.c
Log Message:
Sync OpenBSD patchset 799:
Add other-pane-height and other-pane-width options, allowing the width
or height of the smaller panes in the main-horizontal and main-vertical
layouts to be set. Mostly from David Goodlad.
Index: layout-set.c
===================================================================
RCS file: /cvsroot/tmux/tmux/layout-set.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- layout-set.c 7 Dec 2010 20:23:21 -0000 1.7
+++ layout-set.c 22 Dec 2010 15:23:59 -0000 1.8
@@ -231,8 +231,8 @@
{
struct window_pane *wp;
struct layout_cell *lc, *lcmain, *lcrow, *lcchild;
- u_int n, mainheight, width, height, used;
- u_int i, j, columns, rows, totalrows;
+ u_int n, mainheight, otherheight, width, height;
+ u_int used, i, j, columns, rows, totalrows;
layout_print_cell(w->layout_root, __func__, 1);
@@ -252,6 +252,16 @@
/* Get the main pane height and add one for separator line. */
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)
mainheight = PANE_MINIMUM + 1;
@@ -342,8 +352,8 @@
{
struct window_pane *wp;
struct layout_cell *lc, *lcmain, *lccolumn, *lcchild;
- u_int n, mainwidth, width, height, used;
- u_int i, j, columns, rows, totalcolumns;
+ u_int n, mainwidth, otherwidth, width, height;
+ u_int used, i, j, columns, rows, totalcolumns;
layout_print_cell(w->layout_root, __func__, 1);
@@ -363,6 +373,16 @@
/* Get the main pane width and add one for separator line. */
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)
mainwidth = PANE_MINIMUM + 1;
Index: tmux.c
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.c,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -d -r1.226 -r1.227
--- tmux.c 10 Dec 2010 21:19:13 -0000 1.226
+++ tmux.c 22 Dec 2010 15:23:59 -0000 1.227
@@ -410,6 +410,8 @@
options_set_number(wo, "monitor-activity", 0);
options_set_string(wo, "monitor-content", "%s", "");
options_set_number(wo, "monitor-silence", 0);
+ options_set_number(wo, "other-pane-height", 0);
+ options_set_number(wo, "other-pane-width", 0);
options_set_number(wo, "window-status-attr", 0);
options_set_number(wo, "window-status-bg", 8);
options_set_number(wo, "window-status-current-attr", 0);
Index: cmd-set-option.c
===================================================================
RCS file: /cvsroot/tmux/tmux/cmd-set-option.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- cmd-set-option.c 6 Dec 2010 22:52:20 -0000 1.101
+++ cmd-set-option.c 22 Dec 2010 15:23:59 -0000 1.102
@@ -159,6 +159,8 @@
{ "monitor-activity", SET_OPTION_FLAG, 0, 0, NULL },
{ "monitor-content", SET_OPTION_STRING, 0, 0, NULL },
{ "monitor-silence",SET_OPTION_NUMBER, 0, INT_MAX, NULL},
+ { "other-pane-height", SET_OPTION_NUMBER, 0, INT_MAX, NULL },
+ { "other-pane-width", SET_OPTION_NUMBER, 0, INT_MAX, NULL },
{ "remain-on-exit", SET_OPTION_FLAG, 0, 0, NULL },
{ "synchronize-panes", SET_OPTION_FLAG, 0, 0, NULL },
{ "utf8", SET_OPTION_FLAG, 0, 0, NULL },
Index: tmux.1
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.1,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -d -r1.277 -r1.278
--- tmux.1 11 Dec 2010 18:42:20 -0000 1.277
+++ tmux.1 22 Dec 2010 15:23:59 -0000 1.278
@@ -2199,6 +2199,25 @@
status line.
An interval of zero disables the monitoring.
.Pp
+.It Ic other-pane-height Ar height
+Set the height of the other panes (not the main pane) in the
+.Ic main-horizontal
+layout.
+If this option is set to 0 (the default), it will have no effect.
+If both the
+.Ic main-pane-height
+and
+.Ic other-pane-height
+options are set, the main pane will grow taller to make the other panes the
+specified height, but will never shrink to do so.
+.Pp
+.It Ic other-pane-width Ar width
+Like
+.Ic other-pane-height ,
+but set the width of other panes in the
+.Ic main-vertical
+layout.
+.Pp
.It Xo Ic remain-on-exit
.Op Ic on | off
.Xc
------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months. Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs