From f88cb8c018c748326e1db3ae9b98458152293761 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sun, 26 Jun 2022 21:12:07 +0800 Subject: [PATCH] fix that continuation line numbers (....) are colored when colors should not be used --- src/display/side_by_side.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/side_by_side.rs b/src/display/side_by_side.rs index f1c19925a..17134d42e 100644 --- a/src/display/side_by_side.rs +++ b/src/display/side_by_side.rs @@ -521,7 +521,7 @@ pub fn print( display_options.use_color, ); if let Some(line_num) = lhs_line_num { - if lhs_lines_with_novel.contains(&line_num) { + if display_options.use_color && lhs_lines_with_novel.contains(&line_num) { s = if display_options.background_color.is_dark() { s.bright_red().to_string() } else { @@ -542,7 +542,7 @@ pub fn print( display_options.use_color, ); if let Some(line_num) = rhs_line_num { - if rhs_lines_with_novel.contains(&line_num) { + if display_options.use_color && rhs_lines_with_novel.contains(&line_num) { s = if display_options.background_color.is_dark() { s.bright_green().to_string() } else {