Permalink
Browse files

implemented potential fix for #669

  • Loading branch information...
1 parent 84e8de2 commit f8eb7648db52c1a1a2996be5637700c612e3e8b5 @odrobnik odrobnik committed Nov 14, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 Core/Source/DTCoreTextLayoutFrame.m
@@ -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;
@@ -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])
{

0 comments on commit f8eb764

Please sign in to comment.