summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2024-01-20 14:06:03 -0500
committerGitHub <noreply@github.com>2024-01-20 14:06:03 -0500
commite208f4ed52759fc018ee14808717c977df57b56f (patch)
treed8f966e1a3e6b8e839dce549f65433bf070f7135
parent9f66dc38497c93fdf6e402ba75d5dc4de1bb8051 (diff)
Bug fix: reset syntax highlighter across grep sections (#1613)
-rw-r--r--src/handlers/grep.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/handlers/grep.rs b/src/handlers/grep.rs
index bbdee10c..5aee6dc7 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())