Corrected bug in setupChunk() that showed formats for the wrong

range of characters.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9941 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-05-13 21:10:22 +00:00
parent bae5295ce7
commit 1aa5864538

View file

@ -477,7 +477,7 @@ setupChunk(GSTextChunk *chunk, NSAttributedString *str, NSRange range,
attr = [str attributesAtIndex: loc effectiveRange: &range];
if (range.location < loc)
{
range.length -= (range.location - loc);
range.length -= (loc - range.location);
range.location = loc;
}
if (NSMaxRange(range) > end)
@ -485,7 +485,6 @@ setupChunk(GSTextChunk *chunk, NSAttributedString *str, NSRange range,
where = loc - start;
length = range.length;
if (lastRun == 0)
{
setupRun(&chunk->run0, length, &chars[where], loc, attr, g, 0);