Merge pull request #552 from j-tai/icons-1-col

Display icons when file names are too long for grid
This commit is contained in:
Benjamin Sago 2020-01-19 00:20:18 +00:00 committed by GitHub
commit 404ed20fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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())?;
}