mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 03:51:04 +00:00
Text storage fix.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9667 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4b712d42ac
commit
512bbbf9d8
2 changed files with 24 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-04-22 Georg Fleischmann
|
||||
|
||||
* gui/Source/GSTextStorage.m:
|
||||
([GSTextStorage.m replaceCharactersInRange:withString:])
|
||||
recalculate effective range after removing attributes.
|
||||
|
||||
2001-04-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSColor.m:
|
||||
|
|
|
@ -738,18 +738,25 @@ SANITY();
|
|||
}
|
||||
|
||||
moveLocations = [aString length] - range.length;
|
||||
if (effectiveRange.location == range.location
|
||||
&& effectiveRange.length == range.length
|
||||
&& (moveLocations + range.length) == 0)
|
||||
|
||||
/*
|
||||
* If we are replacing a range with a zero length string and the
|
||||
* range we are using matches the range replaced, then we must
|
||||
* remove it from the array to avoid getting a zero length range.
|
||||
*/
|
||||
if ((moveLocations + range.length) == 0)
|
||||
{
|
||||
/*
|
||||
* If we are replacing a range with a zero length string and the
|
||||
* range we are using matches the range replaced, then we must
|
||||
* remove it from the array to avoid getting a zero length range.
|
||||
*/
|
||||
arrayIndex--;
|
||||
REMOVEAT(arrayIndex);
|
||||
arraySize--;
|
||||
attrs = _attributesAtIndexEffectiveRange(start, &effectiveRange,
|
||||
tmpLength, _infoArray, &arrayIndex);
|
||||
arrayIndex ++;
|
||||
|
||||
if (effectiveRange.location == range.location
|
||||
&& effectiveRange.length == range.length)
|
||||
{
|
||||
arrayIndex--;
|
||||
REMOVEAT(arrayIndex);
|
||||
arraySize--;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue