1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Prevent tiled producing a corrupt layout when only one column is needed,

from Karl Ferdinand Ebert.
This commit is contained in:
Nicholas Marriott 2011-03-07 23:55:16 +00:00
parent 79e30daeae
commit 0a404aabd3

View File

@ -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;