Explorar el Código

Don't pad the final column

Ben S hace 11 años
padre
commit
fc90f4bfc9
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      src/exa.rs

+ 6 - 1
src/exa.rs

@@ -92,7 +92,12 @@ fn grid_view(options: &Options, across: bool, dir: Dir) {
             let file = files.get(num);
             let file_name = file.name.clone();
             let styled_name = file.file_colour().paint(file_name.as_slice());
-            print!("{}", Left.pad_string(&styled_name, max_column_length - file_name.len() + 1));
+            if x == num_columns - 1 {
+                print!("{}", styled_name);
+            }
+            else {
+                print!("{}", Left.pad_string(&styled_name, max_column_length - file_name.len() + 1));
+            }
         }
         print!("\n");
     }