git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48627
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// should never see it
if ( buf[len - 2] == _T('\r') && buf[len - 1] == _T('\n') )
{
// should never see it
if ( buf[len - 2] == _T('\r') && buf[len - 1] == _T('\n') )
{
+ // richedit 1.0 uses "\r\n" as line terminator, so remove "\r"
+ // here and "\n" below
buf[len - 2] = _T('\n');
len--;
}
buf[len - 2] = _T('\n');
len--;
}
+ else if ( buf[len - 1] == _T('\r') )
+ {
+ // richedit 2.0+ uses only "\r", replace it with "\n"
+ buf[len - 1] = _T('\n');
+ }
}
#endif // wxUSE_RICHEDIT
}
#endif // wxUSE_RICHEDIT