Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

implemented potential fix for #669

  • Loading branch information...
commit f8eb7648db52c1a1a2996be5637700c612e3e8b5 1 parent 84e8de2
@Cocoanetics authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Core/Source/DTCoreTextLayoutFrame.m
View
4 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])
{
Please sign in to comment.
Something went wrong with that request. Please try again.