mookid / diffr

Yet another diff highlighting tool
MIT License
572 stars 22 forks source link

Doesn't properly handle changed last line followed by "\ No newline at end of file" #90

Closed ecm-pushbx closed 1 year ago

ecm-pushbx commented 1 year ago

Running version 0.1.4 on an amd64 Debian host. The minus line (deleted) is treated as just deletion, all highlighted by diffr, and the \ No newline at end of file line and the following plus line (addition) are both not coloured at all.

mookid commented 1 year ago

hello @ecm-pushbx

$ cat before <(echo @@@@@@) after <(echo @@@@@@)
abcd efgh ijkl@@@@@@
efgh ijkl mnop@@@@@@

image

What would you expect to be different?

ecm-pushbx commented 1 year ago

It seems that my version is outdated, your test shows the wrong output on my end.

Screenshot_20230806-180342

I mentioned a version originally, but it probably helps more to list the commit ID, which was d20e32f. I tried to update the repo and rebuild the application. This revision seems to change the behaviour as desired: https://github.com/mookid/diffr/commit/d0ed0b92439d5a5bd86ec15a5783512ca6ea302f

mookid commented 1 year ago

cool! thanks for the bug report, and sorry for the slow response.