diff options
author | Dan Davison <dandavison7@gmail.com> | 2022-07-15 08:39:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 08:39:33 -0400 |
commit | f556db8d4edac47c6b053191f02568969a14f06a (patch) | |
tree | 860a3f7918714b8f4bb7a02970493ea4d88a1df1 /src | |
parent | f3b6c454b2e0e8a2b3e2a93ee2d9dd53d9056504 (diff) |
Recreate highlighter on each line of `git show $commit:$path` output (#1127)
Prior to this commit, syntax highlighting of scala code was not
correct in `git show $commit:$path` output. It was working for other
languages as far as I know. I'm not sure why.
Diffstat (limited to 'src')
-rw-r--r-- | src/handlers/git_show_file.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/handlers/git_show_file.rs b/src/handlers/git_show_file.rs index 13a0947c..a9e1358e 100644 --- a/src/handlers/git_show_file.rs +++ b/src/handlers/git_show_file.rs @@ -14,12 +14,12 @@ impl<'a> StateMachine<'a> { { self.state = State::GitShowFile; self.painter.set_syntax(Some(extension)); - self.painter.set_highlighter(); } else { return Ok(handled_line); } } if matches!(self.state, State::GitShowFile) { + self.painter.set_highlighter(); self.painter.syntax_highlight_and_paint_line( &self.line, StyleSectionSpecifier::Style(self.config.zero_style), |