diff --git a/crussh.py b/crussh.py index 1b47db0..cbaf2f3 100755 --- a/crussh.py +++ b/crussh.py @@ -235,6 +235,9 @@ class CruSSH: rows = int(math.ceil(num_terms / float(cols))) if rows < 1: rows = 1 + # ensure we evenly distribute terminals per row. + cols = int(math.ceil(num_terms / float(rows))) + if (self.LayoutTable.props.n_columns != cols) or (self.LayoutTable.props.n_rows != rows) or force: self.reflowTable(cols, rows) self.MainWin.show_all()