This has been here since other-pane-height/-width was introduced
("OpenBSD patchset 799"?). It seems like a simple copy-and-paste error.

This just changes w->sx to w->sy.

---

I found this while testing with a non-zero other-pane-height and
applying the main-horizontal layout. I was consistently getting
heights of just two lines for the other pane(s) when used in
a window displayed on a "wide" terminal (i.e. anything with more
columns than rows, which is probably fairly common).

-- 
Chris

diff --git i/trunk/layout-set.c w/trunk/layout-set.c
index 7fcc395..646528b 100644
--- i/trunk/layout-set.c
+++ w/trunk/layout-set.c
@@ -260,8 +260,8 @@ layout_set_main_h(struct window *w)
         * 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 (otherheight > 1 && w->sy - otherheight > mainheight)
+               mainheight = w->sy - otherheight;
        if (mainheight < PANE_MINIMUM + 1)
                mainheight = PANE_MINIMUM + 1;

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to