Diff algorithm detects two consecutive added lines as two changes (instead of one)
bersbersbers opened this issue · comments
bersbersbers commented
- VS Code Version: 1.54.3
- OS Version: Windows 10, SSH to Linux
Steps to Reproduce:
bug1.txt
:
1
2
bug2.txt
:
1
1.5
2
3
- Compare selected
This diff is not wrong, but it's not minimal. The first two changes could be merged into one, just like diff
does it:
> diff bug1.txt bug2.txt
2a3,4
> 1.5
>
4a7,8
>
> 3
Interestingly, removing the final line break from bug2.txt
prevents the issue:
Does this issue occur when all extensions are disabled?: Yes
bersbersbers commented
Thanks!