A few text storage bugfixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8585 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2001-01-13 20:33:32 +00:00
parent 4c1560cf55
commit 4d25305e2e
2 changed files with 16 additions and 6 deletions

View file

@ -278,10 +278,14 @@ _setAttributesFrom(
[_infoArray removeAllObjects];
if (aRange.length <= 0)
return;
attr = [attributedString attributesAtIndex: aRange.location
effectiveRange: &range];
{
attr = [NSDictionary dictionary];
}
else
{
attr = [attributedString attributesAtIndex: aRange.location
effectiveRange: &range];
}
attr = cacheAttributes(attr);
info = NEWINFO(z, attr, 0);
ADDOBJECT(info);
@ -731,11 +735,11 @@ SANITY();
}
}
info->loc = NSMaxRange(range);
SANITY();
}
moveLocations = [aString length] - range.length;
if (effectiveRange.location == range.location
&& effectiveRange.length == range.length
&& (moveLocations + range.length) == 0)
{
/*
@ -748,7 +752,6 @@ SANITY();
arraySize--;
}
SANITY();
/*
* Now adjust the positions of the ranges following the one we are using.
*/