mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Attributed string bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6409 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
87ca114f49
commit
587a0e41d5
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2000-04-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSAttributedString.m: Infinite loop fix by Fred Kiefer to
|
||||||
|
([replaceCharactersInRange:withAttributedString:])
|
||||||
|
|
||||||
2000-03-29 Richard Frith-Macdonald <rfm@gnu.org>
|
2000-03-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSUserDefaults.m: typo reported by karl@nfox.com fixed.
|
* Source/NSUserDefaults.m: typo reported by karl@nfox.com fixed.
|
||||||
|
|
|
@ -621,17 +621,18 @@ static Class NSMutableAttributedString_concrete_class;
|
||||||
NSRange ownRange;
|
NSRange ownRange;
|
||||||
NSDictionary *attrDict;
|
NSDictionary *attrDict;
|
||||||
NSString *tmpStr;
|
NSString *tmpStr;
|
||||||
|
unsigned loc;
|
||||||
|
|
||||||
tmpStr = [attributedString string];
|
tmpStr = [attributedString string];
|
||||||
[self replaceCharactersInRange: aRange withString: tmpStr];
|
[self replaceCharactersInRange: aRange withString: tmpStr];
|
||||||
|
|
||||||
effectiveRange = NSMakeRange(0,0);
|
effectiveRange = NSMakeRange(0,0);
|
||||||
clipRange = NSMakeRange(0,[tmpStr length]);
|
clipRange = NSMakeRange(0,[tmpStr length]);
|
||||||
while (NSMaxRange(effectiveRange) < NSMaxRange(clipRange))
|
while ((loc = NSMaxRange(effectiveRange)) < NSMaxRange(clipRange))
|
||||||
{
|
{
|
||||||
attrDict = [attributedString attributesAtIndex: effectiveRange.location
|
attrDict = [attributedString attributesAtIndex: loc
|
||||||
effectiveRange: &effectiveRange];
|
effectiveRange: &effectiveRange];
|
||||||
ownRange = NSIntersectionRange(clipRange,effectiveRange);
|
ownRange = NSIntersectionRange(clipRange, effectiveRange);
|
||||||
ownRange.location += aRange.location;
|
ownRange.location += aRange.location;
|
||||||
[self setAttributes: attrDict range: ownRange];
|
[self setAttributes: attrDict range: ownRange];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue