From 0a404aabd3d0e383b8f05ba6090ca927f4baccb2 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 7 Mar 2011 23:55:16 +0000 Subject: Prevent tiled producing a corrupt layout when only one column is needed, from Karl Ferdinand Ebert. --- layout-set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layout-set.c') 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; -- cgit v1.2.3