Change print_diff to output the correct line number.

This commit is contained in:
Robert Bartlensky 2018-09-06 17:16:48 +01:00
parent 6ada5b51cc
commit 992b179d33

View File

@ -161,7 +161,7 @@ pub fn print_diff<F>(diff: Vec<Mismatch>, get_section_title: F, config: &Config)
let mut writer = OutputWriter::new(color);
for mismatch in diff {
let title = get_section_title(mismatch.line_number);
let title = get_section_title(mismatch.line_number_orig);
writer.writeln(&title, None);
for line in mismatch.lines {