diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-03-07 23:55:16 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-03-07 23:55:16 +0000 |
commit | 0a404aabd3d0e383b8f05ba6090ca927f4baccb2 (patch) | |
tree | 7ddbcb1bc1f2d261c95b870369ac1213d391c31f | |
parent | 79e30daeae1d49a1cf1dc4618edf1ec82804a80c (diff) | |
download | rtmux-0a404aabd3d0e383b8f05ba6090ca927f4baccb2.tar.gz rtmux-0a404aabd3d0e383b8f05ba6090ca927f4baccb2.tar.bz2 rtmux-0a404aabd3d0e383b8f05ba6090ca927f4baccb2.zip |
Prevent tiled producing a corrupt layout when only one column is needed,
from Karl Ferdinand Ebert.
-rw-r--r-- | layout-set.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layout-set.c b/layout-set.c index 63a6a69e..eb75233a 100644 --- a/layout-set.c +++ b/layout-set.c @@ -519,7 +519,7 @@ layout_set_tiled(struct window *w) TAILQ_INSERT_TAIL(&lc->cells, lcrow, entry); /* If only one column, just use the row directly. */ - if (n - (j * columns) == 1) { + if (n - (j * columns) == 1 || columns == 1) { layout_make_leaf(lcrow, wp); wp = TAILQ_NEXT(wp, entry); continue; |