Browse Source

fix: calculate width correctly when using grid icons & classify

Resolves: #578
Ankit Soni 2 years ago
parent
commit
294ab6cddc
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/output/grid.rs

+ 7 - 1
src/output/grid.rs

@@ -83,7 +83,13 @@ impl<'a> Render<'a> {
                 (
                     EmbedHyperlinks::Off,
                     ShowIcons::Always(spacing) | ShowIcons::Automatic(spacing),
-                ) => filename.bare_width() + 1 + (spacing as usize) + space_filename_offset,
+                ) => {
+                    filename.bare_width()
+                        + classification_width
+                        + 1
+                        + (spacing as usize)
+                        + space_filename_offset
+                }
                 (EmbedHyperlinks::Off, _) => *contents.width(),
             };