Display icons when file names are too long for grid

Fixes ogham/exa#548
This commit is contained in:
James Tai 2019-07-30 18:33:12 -07:00
parent 89c861f24d
commit dd9dffff8c

View File

@ -63,6 +63,9 @@ impl<'a> Render<'a> {
// This isnt *quite* the same as the lines view, which also
// displays full link paths.
for file in &self.files {
if self.opts.icons {
write!(w, "{}", painted_icon(&file, &self.style))?;
}
let name_cell = self.style.for_file(file, self.colours).paint();
writeln!(w, "{}", name_cell.strings())?;
}