diff options
Diffstat (limited to 'lib/grep.ml')
-rw-r--r-- | lib/grep.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/grep.ml b/lib/grep.ml index 2e55b40..5690edc 100644 --- a/lib/grep.ml +++ b/lib/grep.ml @@ -295,8 +295,9 @@ type display_type = let pretty_print_parsed_content parsed_files = let padding = String.make headline_pattern_length ' ' in List.concat_map - (fun (file_name, line_number, line_content, _) -> + (fun (file_name, line_number, line_content, file_number) -> if line_number == 0 - then [ Bold ("--------- " ^ file_name); Normal line_content ] - else [ Normal (padding ^ line_content) ]) + then + [ file_number, Bold ("--------- " ^ file_name); file_number, Normal line_content ] + else [ file_number, Normal (padding ^ line_content) ]) parsed_files |