Made a check for line range stricter ... apparently because of a bug

elsewhere, the stricter check is needed to prevent a crash


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13202 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-03-22 11:46:08 +00:00
parent 9e4dc40eb9
commit 8564eb7342

View file

@ -477,6 +477,9 @@ static NSCharacterSet *invSelectionWordGranularitySet;
[[aTextContainer textView] sizeToFit];
[[aTextContainer textView] invalidateTextContainerOrigin];
/* FIXME - it was reported that at this point lineRange is no longer
* correct ... looks like sizeToFit / invalidateTextContainerOrigin
* migth cause additional relayout. */
[self setNeedsDisplayForLineRange: lineRange
inTextContainer: aTextContainer];
}
@ -740,7 +743,7 @@ forStartOfGlyphRange: (NSRange)glyphRange
inTextContainer: (NSTextContainer *)aTextContainer
{
if ([_lineLayoutInformation count]
&& redrawLineRange.location < [_lineLayoutInformation count]
&& NSMaxRange (redrawLineRange) < [_lineLayoutInformation count]
&& redrawLineRange.length)
{
_GNULineLayoutInfo *firstInfo