diff --git a/ChangeLog b/ChangeLog index c2bc76ee8..041b3a5f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-30 Wolfgang Lux + + * Source/NSTextView.m (-initWithFrame:, -initWithFrame:textContainer:): + Ensure a more consistent initial setup of a new text view and its + text container. + 2010-05-30 Wolfgang Lux * Source/NSTextView.m (-initWithCoder:, -initWithTextView:, diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 0ab113234..b59a6f23b 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -706,7 +706,7 @@ If a text view is added to an empty text network, it keeps its attributes. _tf.draws_background = YES; _tf.is_horizontally_resizable = NO; - _tf.is_vertically_resizable = YES; + _tf.is_vertically_resizable = NO; /* We set defaults for all shared attributes here. If container is already part of a text network, we reset the attributes in -setTextContainer:. */ @@ -744,9 +744,12 @@ If a text view is added to an empty text network, it keeps its attributes. { NSTextContainer *aTextContainer; - aTextContainer = [self buildUpTextNetwork: frameRect.size]; + NSSize containerSize = NSMakeSize(NSWidth(frameRect), 1e7); + aTextContainer = [self buildUpTextNetwork: containerSize]; self = [self initWithFrame: frameRect textContainer: aTextContainer]; + [self setVerticallyResizable: YES]; + [aTextContainer setWidthTracksTextView: YES]; /* At this point the situation is as follows: