Wilfred / difftastic

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

Fix text diff of large chunks to not emit last blank line #731

Closed yuja closed 2 months ago

yuja commented 3 months ago

~This fixes crash in inline printer, which assumes that hunk lines are within range. I'm not pretty sure if this assumption holds anytime, but myers_diff appears not emitting the last blank line, so I made the fall-back path do the same.~

~This will hopefully fix #702.~

myers_diff doesn't emit the last blank line, so I made the fall-back path do the same.

This was originally intended to fix #702, but fixes crash with sample_files/big_text_hunk_?.txt on 0.59.0. It probably fixes #739.

MingcongBai commented 2 months ago

Can confirm that this fixes the aforementioned crash on 0.59.0.

See https://github.com/AOSC-Dev/aosc-os-abbs/pull/7192.

yuja commented 2 months ago

Superseded by 1ac95534fe9072944ff78757f32efb17f36690d7 and other fixes.