Skip to content

Commit

Permalink
Bug fix: don't forget non-emph states
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Nov 23, 2021
1 parent 0c0043b commit 8354b62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/paint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,11 +627,13 @@ impl<'p> Painter<'p> {
State::HunkMinus(None) => {
config.minus_style.is_syntax_highlighted
|| config.minus_emph_style.is_syntax_highlighted
|| config.minus_non_emph_style.is_syntax_highlighted
}
State::HunkZero => config.zero_style.is_syntax_highlighted,
State::HunkPlus(None) => {
config.plus_style.is_syntax_highlighted
|| config.plus_emph_style.is_syntax_highlighted
|| config.plus_non_emph_style.is_syntax_highlighted
}
State::HunkHeader(_, _) => true,
State::HunkMinus(Some(_)) | State::HunkPlus(Some(_)) => false,
Expand Down

0 comments on commit 8354b62

Please sign in to comment.