diff --git a/Source/GSTextStorage.m b/Source/GSTextStorage.m index 4e6ad2721..b2c4cb1d8 100644 --- a/Source/GSTextStorage.m +++ b/Source/GSTextStorage.m @@ -584,7 +584,7 @@ SANITY(); info->loc = afterRangeLoc; arrayIndex--; } - else if (effectiveRange.location < beginRangeLoc) + else if (NSMaxRange(effectiveRange) > afterRangeLoc) { /* * The located range starts before our range.