diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-04-24 16:42:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-24 16:42:26 -0400 |
commit | a15b1221ba29ec062590069ea629a0464f81e0a6 (patch) | |
tree | e2cc66f396f91e0e1f302bd6b8d0569ca5b76a41 | |
parent | ab77bff0fca94551853459b011533693f6c68e1d (diff) |
Make navigate work when files are represented in the hunk header (#575)
-rw-r--r-- | src/hunk_header.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hunk_header.rs b/src/hunk_header.rs index da2df606..fa9f02c5 100644 --- a/src/hunk_header.rs +++ b/src/hunk_header.rs @@ -94,6 +94,11 @@ fn get_painted_file_with_line_number( config: &Config, ) -> String { let mut file_with_line_number = Vec::new(); + let modified_label; + if config.navigate { + modified_label = format!("{} ", config.file_modified_label); + file_with_line_number.push(config.hunk_header_file_style.paint(&modified_label)); + } let plus_line_number = line_numbers[line_numbers.len() - 1].0; if config.hunk_header_style_include_file_path { file_with_line_number.push(config.hunk_header_file_style.paint(plus_file)) |