diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 0765ba5c0..edfed5500 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -3120,12 +3120,18 @@ other than copy/paste or dragging. */ return; [_textStorage beginEditing]; + if (_tf.is_rich_text) - [_textStorage replaceCharactersInRange: aRange - withAttributedString: attrString]; + { + [_textStorage replaceCharactersInRange: aRange + withAttributedString: attrString]; + } else - [_textStorage replaceCharactersInRange: aRange - withString: [attrString string]]; + { + [_textStorage replaceCharactersInRange: aRange + withString: [attrString string]]; + } + [_textStorage endEditing]; [self didChangeText]; } diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 49a19e15e..c610f5988 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -345,7 +345,7 @@ static NSCell* tileCell = nil; - (void) drawRect: (NSRect)rect { NSColor *c = [[self window] backgroundColor]; - + [c set]; NSRectFill(rect); } @@ -3440,7 +3440,9 @@ resetCursorRectsForView(NSView *theView) r.origin = NSZeroPoint; r.size = aSize; if (_contentView) - [_contentView setFrame: r]; + { + [_contentView setFrame: r]; + } } - (void) _setVisible: (BOOL)flag