mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +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
|
@ -1,3 +1,9 @@
|
|||
2020-09-11 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSLayoutManager.m
|
||||
(-glyphRangeForCharacterRange:actualCharacterRange:): Handle zero
|
||||
length charRagne at end of text correctly.
|
||||
|
||||
2020-09-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSXib5KeyedUnarchiver.m
|
||||
|
|
|
@ -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…
Reference in a new issue