Jelajahi Sumber

feat(output): adjust FileName.paint to consider possible icon color

Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Sandro-Alessio Gierens 1 tahun lalu
induk
melakukan
7790788609
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      src/output/file_name.rs

+ 4 - 1
src/output/file_name.rs

@@ -203,7 +203,10 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
         };
         };
 
 
         if let Some(spaces_count) = spaces_count_opt {
         if let Some(spaces_count) = spaces_count_opt {
-            let style = iconify_style(self.style());
+            let style = iconify_style(match self.colours.icon() {
+                Some(style) => style,
+                None => self.style(),
+            });
             let file_icon = icon_for_file(self.file).to_string();
             let file_icon = icon_for_file(self.file).to_string();
             bits.push(style.paint(file_icon));
             bits.push(style.paint(file_icon));
             bits.push(style.paint(" ".repeat(spaces_count as usize)));
             bits.push(style.paint(" ".repeat(spaces_count as usize)));