Prechádzať zdrojové kódy

Fix bug where unfilled displays were being checked

Ben S 10 rokov pred
rodič
commit
6d6e8b78f0
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      src/output/grid_details.rs

+ 6 - 1
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 {