Corrections in replaceCharactersInRange:withString:

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6494 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2000-04-23 00:35:48 +00:00
parent b734a85d04
commit f63c03ad9a

View file

@ -513,6 +513,9 @@ SANITY();
*/ */
[textChars appendString: aString]; [textChars appendString: aString];
SANITY(); SANITY();
[self edited: NSTextStorageEditedCharacters
range: range
changeInLength: [aString length] - range.length];
return; return;
} }
@ -525,6 +528,9 @@ SANITY();
*/ */
[textChars replaceCharactersInRange: range withString: aString]; [textChars replaceCharactersInRange: range withString: aString];
SANITY(); SANITY();
[self edited: NSTextStorageEditedCharacters
range: range
changeInLength: [aString length] - range.length];
return; return;
} }
@ -547,6 +553,7 @@ SANITY();
info = NEWINFO(z, attrs, NSMaxRange(range)); info = NEWINFO(z, attrs, NSMaxRange(range));
INSOBJECT(info, arrayIndex); INSOBJECT(info, arrayIndex);
arraySize++; arraySize++;
SANITY();
} }
else if (NSMaxRange(effectiveRange) < NSMaxRange(range)) else if (NSMaxRange(effectiveRange) < NSMaxRange(range))
{ {
@ -569,10 +576,12 @@ SANITY();
arraySize--; arraySize--;
info = n; info = n;
} }
break; else
break;
} }
} }
info->loc = NSMaxRange(range); info->loc = NSMaxRange(range);
SANITY();
} }
moveLocations = [aString length] - range.length; moveLocations = [aString length] - range.length;
@ -599,8 +608,8 @@ SANITY();
info->loc += moveLocations; info->loc += moveLocations;
arrayIndex++; arrayIndex++;
} }
SANITY();
[textChars replaceCharactersInRange: range withString: aString]; [textChars replaceCharactersInRange: range withString: aString];
SANITY();
[self edited: NSTextStorageEditedCharacters [self edited: NSTextStorageEditedCharacters
range: range range: range