diff --git a/CHANGELOG.md b/CHANGELOG.md index c41290085..8c209927f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## 0.7 (unreleased) +### Diffing + +Fixed issues when creating/removing a whole file meant that difftastic +didn't display anything. + ### Display Side-by-side display now uses "..." for column numbers when aligning diff --git a/src/syntax.rs b/src/syntax.rs index 3ac1cb795..d6203814c 100644 --- a/src/syntax.rs +++ b/src/syntax.rs @@ -832,17 +832,8 @@ pub fn aligned_lines( // different number of lines, we can end up with extra padding on // the side with fewer lines. // - // Work around that by discarding any lines at the beginning with - // aren't matched. - // // TODO: fix padding to be smarter. - // - // TODO: do the same for the end of the hunk. aligned_lines_(&lhs_lines, &rhs_lines, lhs_line_matches) - .iter() - .skip_while(|(lhs, rhs)| lhs.is_none() || rhs.is_none()) - .copied() - .collect() } /// Given two slices of contiguous line numbers, return pairs of