From 9b439e25661b83cb262467f836273d67b718762e Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sat, 26 Oct 2024 21:44:11 +0300 Subject: [PATCH] color differing line number as well --- src/line.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/line.rs b/src/line.rs index 0082c33..53c7b08 100644 --- a/src/line.rs +++ b/src/line.rs @@ -40,7 +40,10 @@ impl Line { let _ = stdout.set_color(ColorSpec::new().set_fg(Some(Color::Green))); println!(" - {}", left_line); let _ = stdout.reset(); - println!("{line_number}. ----"); + let _ = stdout.set_color(ColorSpec::new().set_fg(Some(Color::Red))); + print!("{}.", line_number); + let _ = stdout.reset(); + println!("----"); let _ = stdout.set_color(ColorSpec::new().set_fg(Some(Color::Red))); println!(" + {}", right_line); let _ = stdout.reset();