mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 14:36:36 +00:00
* Source/GSLayoutManager.m
+ (-glyphRangeForCharacterRange:actualCharacterRange:): Handle zero + length charRagne at end of text correctly.
This commit is contained in:
parent
6832eaf1c4
commit
c39b49c0d2
2 changed files with 8 additions and 2 deletions
|
@ -1134,16 +1134,16 @@ Fills in all glyph holes up to last. only looking at levels below level
|
|||
*actualCharRange = charRange;
|
||||
return NSMakeRange(0, 0);
|
||||
}
|
||||
target = charRange.location;
|
||||
pos = NSMaxRange(charRange) - 1;
|
||||
[self _generateGlyphsUpToCharacter: pos];
|
||||
if (glyphs->char_length <= pos)
|
||||
if (glyphs->char_length <= pos || glyphs->char_length <= target)
|
||||
{
|
||||
if (actualCharRange)
|
||||
*actualCharRange = NSMakeRange([[_textStorage string] length], 0);
|
||||
return NSMakeRange([self numberOfGlyphs], 0);
|
||||
}
|
||||
|
||||
target = charRange.location;
|
||||
r = [self _glyphForCharacter: target
|
||||
index: &i
|
||||
positions: &pos : &cpos];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue