Fix pasting multiline text in wxOSX to not use \r
Use wxMacConvertNewlines13To10(), not wxMacConvertNewlines10To13() when copying content from native pasteboard. Perform this conversion not only for 8bit text, but for UTF-16 one (which is the one actually used on modern OS X versions) as well.
This commit is contained in:
@@ -34,6 +34,15 @@ void wxMacConvertNewlines13To10( char * data )
|
||||
}
|
||||
}
|
||||
|
||||
void wxMacConvertNewlines13To10( char * data, size_t len )
|
||||
{
|
||||
for ( ; len; ++data, --len )
|
||||
{
|
||||
if ( *data == 0x0d )
|
||||
*data = 0x0a;
|
||||
}
|
||||
}
|
||||
|
||||
void wxMacConvertNewlines10To13( char * data )
|
||||
{
|
||||
char * buf = data ;
|
||||
|
Reference in New Issue
Block a user