summaryrefslogtreecommitdiffstats
path: root/layout-set.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-03-07 23:55:16 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-03-07 23:55:16 +0000
commit0a404aabd3d0e383b8f05ba6090ca927f4baccb2 (patch)
tree7ddbcb1bc1f2d261c95b870369ac1213d391c31f /layout-set.c
parent79e30daeae1d49a1cf1dc4618edf1ec82804a80c (diff)
Prevent tiled producing a corrupt layout when only one column is needed,
from Karl Ferdinand Ebert.
Diffstat (limited to 'layout-set.c')
-rw-r--r--layout-set.c2
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;