Commit fbd4b010 authored by cblu's avatar cblu

Fixed: 3068112 - extra line breaks when copying from source window

        * Misc.subproj/WebSearchableTextView.m:
        (-[WebSearchableTextView copy:]): Convert CRLF to LF


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 83212c1f
2002-11-19 Chris Blumenberg <cblu@apple.com>
Fixed: 3068112 - extra line breaks when copying from source window
* Misc.subproj/WebSearchableTextView.m:
(-[WebSearchableTextView copy:]): Convert CRLF to LF
2002-11-19 David Hyatt <hyatt@apple.com>
Make sure that if the scrollers are shown/hidden that we
......
2002-11-19 Chris Blumenberg <cblu@apple.com>
Fixed: 3068112 - extra line breaks when copying from source window
* Misc.subproj/WebSearchableTextView.m:
(-[WebSearchableTextView copy:]): Convert CRLF to LF
2002-11-19 David Hyatt <hyatt@apple.com>
Make sure that if the scrollers are shown/hidden that we
......
......@@ -42,6 +42,21 @@ - (BOOL)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (B
return lastFindWasSuccessful;
}
- (void)copy:(id)sender
{
if ([self isRichText]) {
[super copy:sender];
}else{
//Convert CRLF to LF to workaround: 3105538 - Carbon doesn't convert text with CRLF to LF
NSMutableString *string = [[self string] mutableCopy];
[string replaceOccurrencesOfString:@"\r\n" withString:@"\n" options:0 range:NSMakeRange(0, [string length])];
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[pasteboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
[pasteboard setString:string forType:NSStringPboardType];
}
}
@end
@implementation NSString (_Web_StringTextFinding)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment