From c4c173e40ef3b253fa484b243092020b5f435524 Mon Sep 17 00:00:00 2001 From: yuqio Date: Mon, 29 Jun 2020 01:00:11 +0200 Subject: [PATCH] Change red ANSI color code for size of biggest file The enum variant `ansi_term::Colour::Red` (which uses the ANSI color code `31`) is used instead of the code `196` to display the size of the largest file. This means that the red color of the terminal theme is used which is probably preferred by most users. --- src/display.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display.rs b/src/display.rs index 770abdd..642a978 100644 --- a/src/display.rs +++ b/src/display.rs @@ -2,7 +2,7 @@ extern crate ansi_term; use crate::utils::Node; -use self::ansi_term::Colour::Fixed; +use self::ansi_term::Colour::Red; use lscolors::{LsColors, Style}; use terminal_size::{terminal_size, Height, Width}; @@ -298,7 +298,7 @@ pub fn format_string( }; let pretty_size = if is_biggest && display_data.colors_on { - format!("{}", Fixed(196).paint(pretty_size)) + format!("{}", Red.paint(pretty_size)) } else { pretty_size };