Skip to content

Commit

Permalink
implemented potential fix for Cocoanetics#669
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Nov 14, 2013
1 parent 84e8de2 commit f8eb764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Source/DTCoreTextLayoutFrame.m
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ - (BOOL)_enumerateTextBlocksAtLevel:(NSUInteger)level inRange:(NSRange)range usi
while (index<NSMaxRange(range))
{
NSRange textBlocksArrayRange;
NSArray *textBlocks = [_attributedStringFragment attribute:DTTextBlocksAttribute atIndex:index effectiveRange:&textBlocksArrayRange];
NSArray *textBlocks = [_attributedStringFragment attribute:DTTextBlocksAttribute atIndex:index longestEffectiveRange:&textBlocksArrayRange inRange:range];

index += textBlocksArrayRange.length;

Expand All @@ -969,7 +969,7 @@ - (BOOL)_enumerateTextBlocksAtLevel:(NSUInteger)level inRange:(NSRange)range usi
while (searchIndex < length && searchIndex < NSMaxRange(range))
{
NSRange laterBlocksRange;
NSArray *laterBlocks = [_attributedStringFragment attribute:DTTextBlocksAttribute atIndex:searchIndex effectiveRange:&laterBlocksRange];
NSArray *laterBlocks = [_attributedStringFragment attribute:DTTextBlocksAttribute atIndex:searchIndex longestEffectiveRange:&laterBlocksRange inRange:range];

if (![laterBlocks containsObject:blockAtLevelToHandle])
{
Expand Down

0 comments on commit f8eb764

Please sign in to comment.