Explorar o código

Use same styling for spaces between icon and file name

This is only visible when selecting both icon and file name, as most terminal emulators then invert background and foreground color.

It also workaround a Konsole bug: https://bugs.kde.org/show_bug.cgi?id=422776
ariasuni %!s(int64=5) %!d(string=hai) anos
pai
achega
79bac416f6
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/output/file_name.rs

+ 3 - 3
src/output/file_name.rs

@@ -132,9 +132,9 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
             bits.push(style.paint(file_icon));
 
             match spaces_count {
-                1 => bits.push(Style::default().paint(" ")),
-                2 => bits.push(Style::default().paint("  ")),
-                n => bits.push(Style::default().paint(spaces(n))),
+                1 => bits.push(style.paint(" ")),
+                2 => bits.push(style.paint("  ")),
+                n => bits.push(style.paint(spaces(n))),
             }
         }