Distorted lines in `diff`

Distorted lines in `diff` when viewing files `windows-style-line-separator: \r\n`
Merge pull request #3082 from devote/patch-1

Distorted lines in `diff`