Fix newline handling in diff editor

Task-number: QTCREATORBUG-12618
Change-Id: If2a30ff4efdc106f43e2ea77d2783ea797e92722
Reviewed-by: Orgad Shaneh <orgads@gmail.com>