Fix incorrect line number being used in side-by-side display

Fixes #334
pull/341/head
Wilfred Hughes 2022-08-22 09:34:34 +07:00
parent f3420df1ca
commit 09334030ab
3 changed files with 7 additions and 2 deletions

@ -1,5 +1,10 @@
## 0.34 (unreleased)
### Display
Fixed an issue where side-by-side display would sometimes print the
line number from the second file rather than the first file.
## 0.33 (released 21st August 2022)
### Diffing

@ -137,7 +137,7 @@ sample_files/preprocesor_before.h sample_files/preprocesor_after.h
3e4331cb935cbe735a79ebc43786cd3a -
sample_files/ruby_before.rb sample_files/ruby_after.rb
4a9847a91e32ec6afdc2f0b01e28d2d6 -
d88046b43f826a34bbd4a7b9d6bb704d -
sample_files/scala_before.scala sample_files/scala_after.scala
bb18213033492a633e7f978ab9711ae1 -

@ -460,7 +460,7 @@ pub fn print(
// We didn't have any changed RHS lines in the
// hunk, but we had some contextual lines that
// only occurred on the LHS (e.g. extra newlines).
println!("{}{}", display_rhs_line_num, display_rhs_line_num);
println!("{}{}", display_lhs_line_num, display_rhs_line_num);
}
}
} else if no_rhs_changes && !show_both {