Fix minor color bug

If we are not using RED then the Color should be the terminal default
not 7
This commit is contained in:
andy.boot
2018-06-19 23:39:23 +01:00
parent cab24f58d5
commit 0bf4ebf554
3 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
extern crate ansi_term; extern crate ansi_term;
use self::ansi_term::Colour::Fixed; use self::ansi_term::Colour::Fixed;
use self::ansi_term::Style;
use std::collections::HashSet; use std::collections::HashSet;
static UNITS: [char; 4] = ['T', 'G', 'M', 'K']; static UNITS: [char; 4] = ['T', 'G', 'M', 'K'];
@@ -171,7 +172,7 @@ pub fn format_string(
if is_biggest { if is_biggest {
Fixed(196).paint(size) Fixed(196).paint(size)
} else { } else {
Fixed(7).paint(size) Style::new().paint(size)
}, },
indentation, indentation,
printable_name, printable_name,
+1 -1
View File
@@ -88,7 +88,7 @@ fn main() {
let biggest_ones = { let biggest_ones = {
match depth { match depth {
None => find_big_ones(sorted_data, number_of_lines + simplified_dirs.len()), None => find_big_ones(sorted_data, number_of_lines + simplified_dirs.len()),
Some(d) => trim_deep_ones(sorted_data, d, &simplified_dirs) Some(d) => trim_deep_ones(sorted_data, d, &simplified_dirs),
} }
}; };
draw_it(permissions, !use_full_path, depth, simplified_dirs, biggest_ones); draw_it(permissions, !use_full_path, depth, simplified_dirs, biggest_ones);
-1
View File
@@ -279,4 +279,3 @@ fn recursive_sym_link_output(dir: &str, link_name: &str) -> String {
format_string(link_name, true, true, " 0B", " └──",), format_string(link_name, true, true, " 0B", " └──",),
) )
} }