From e208f4ed52759fc018ee14808717c977df57b56f Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 20 Jan 2024 14:06:03 -0500 Subject: [PATCH] Bug fix: reset syntax highlighter across grep sections (#1613) --- src/handlers/grep.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handlers/grep.rs b/src/handlers/grep.rs index bbdee10c1..5aee6dc7b 100644 --- a/src/handlers/grep.rs +++ b/src/handlers/grep.rs @@ -116,6 +116,9 @@ impl<'a> StateMachine<'a> { grep_line.path.to_string(), grep_line.line_number, ); + if new_section { + self.painter.set_highlighter() + } if new_path { if let Some(lang) = handlers::diff_header::get_extension(&grep_line.path) .or(self.config.default_language.as_deref())