Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
20.59k stars 333 forks source link

Inline diff is ignoring unchanged lines between hunks #704

Open olivergondza opened 5 months ago

olivergondza commented 5 months ago

A description of the issue. A screenshot is often helpful too.

Inline diff (side-by-side works well) skips unchanged lines producing confusing diffs:

$ difft --display inline --context 5 before.txt after.txt

Screenshot from 2024-04-23 13-08-50

side-by-side is showing the try and finally lines ok:

$ difft --context 5 before.txt after.txt

Screenshot from 2024-04-23 13-09-04

A copy of what you're diffing. If you're diffing files, include the before and after files. If you're using difftastic with a VCS repository (e.g. git), include the URL and commit hash.

Using before.txt and after.txt.

Note those are groovy files (that difftastic handles as text). But even renamed to .java, the inline diff have same problem.

The version of difftastic you're using (see difft --version) and your operating system.

Difftastic 0.58.0 (f52ca706f 2024-04-09, built with rustc 1.65.0) Linux arch 6.8.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000 x86_64 GNU/Linux