diff options
author | Ben S <ogham@bsago.me> | 2015-06-28 21:27:18 +0100 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-06-28 21:27:18 +0100 |
commit | 6d6e8b78f08b0b261c61e5ea58a22e5d9e6aad39 (patch) | |
tree | 344cfe2670ef2c31919d3ba188c4a8a876d5d682 /src/output | |
parent | 26e3abc6b1f7ad5a390ebe72b34be09705921480 (diff) |
Fix bug where unfilled displays were being checked
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/grid_details.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/output/grid_details.rs b/src/output/grid_details.rs index 192cb1f..9c3eeaa 100644 --- a/src/output/grid_details.rs +++ b/src/output/grid_details.rs @@ -25,7 +25,12 @@ impl GridDetails { for column_count in 2.. { let grid = self.make_grid(column_count, &*columns_for_dir, files, cells.clone()); - if grid.fit_into_columns(column_count).width() <= self.grid.console_width { + let the_grid_fits = { + let d = grid.fit_into_columns(column_count); + d.is_complete() && d.width() <= self.grid.console_width + }; + + if the_grid_fits { last_working_table = grid; } else { |