From 7541172d124036535d598fdb00078c27ceb23b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 5 Nov 2019 16:40:48 +0100 Subject: [PATCH] Make the example show highlighted areas more explicitly --- meilidb-core/examples/from_file.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meilidb-core/examples/from_file.rs b/meilidb-core/examples/from_file.rs index 49f1f2657..2ed5e5b9f 100644 --- a/meilidb-core/examples/from_file.rs +++ b/meilidb-core/examples/from_file.rs @@ -217,7 +217,11 @@ fn display_highlights(text: &str, ranges: &[usize]) -> io::Result<()> { _ => unreachable!(), }; if highlighted { - stdout.set_color(ColorSpec::new().set_fg(Some(Color::Yellow)))?; + stdout.set_color( + ColorSpec::new() + .set_fg(Some(Color::Yellow)) + .set_underline(true), + )?; } write!(&mut stdout, "{}", &text[start..end])?; stdout.reset()?;