diff options
-rw-r--r-- | src/delta.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/delta.rs b/src/delta.rs index 05180422..6473571b 100644 --- a/src/delta.rs +++ b/src/delta.rs @@ -94,7 +94,9 @@ where &minus_file, )); } - } else if line.starts_with("+++ ") || line.starts_with("rename to ") { + } else if (state == State::FileMeta || source == Source::DiffUnified) + && (line.starts_with("+++ ") || line.starts_with("rename to ")) + { plus_file = parse::get_file_path_from_file_meta_line(&line, source == Source::GitDiff); painter.set_syntax(parse::get_file_extension_from_file_meta_line_file_path( &plus_file, |