diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 9c0cc6696..ff57506a0 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -2536,10 +2536,9 @@ var _CPCopyPlaceholder = '-'; } else if (node.nodeName === '#text') [rtfdata appendAttributedString:[[CPAttributedString alloc] initWithString:node.nodeValue attributes:@{}]]; - - if (l > 1) - [rtfdata appendAttributedString:[[CPAttributedString alloc] initWithString:"\n" attributes:@{}]]; } + if (l > 1) + [rtfdata appendAttributedString:[[CPAttributedString alloc] initWithString:"\n" attributes:@{}]]; } }; @@ -2587,8 +2586,6 @@ var _CPCopyPlaceholder = '-'; _CPDOMParsefunction(_CPNativeInputField.getElementsByTagName("p")); [pasteboard declareTypes:[CPRTFPboardType] owner:nil]; - var rtf = [_CPRTFProducer produceRTF:rtfdata documentAttributes:@{}]; - debugger [pasteboard setString:[_CPRTFProducer produceRTF:rtfdata documentAttributes:@{}] forType:CPRTFPboardType]; [[[CPApp keyWindow] firstResponder] paste:self]; diff --git a/AppKit/CPTextView/_CPRTFParser.j b/AppKit/CPTextView/_CPRTFParser.j index f1f94db99..43dbfa6f1 100644 --- a/AppKit/CPTextView/_CPRTFParser.j +++ b/AppKit/CPTextView/_CPRTFParser.j @@ -514,7 +514,7 @@ var kRgsymRtf = { return [self _applyPropChange:sym parameter:param]; case kRTFParserType_char: - if((param + '') !== 'NaN' && (param + '').length) + if((param + '') !== 'NaN' && (param + '') !== 'null' && (param + '').length) _currentParseIndex -= (param + '').length; return [self _checkChar:sym parameter:param];