aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r--Source/SPNarrowDownCompletion.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index d5391644..b9dba0e4 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -1025,7 +1025,7 @@
if (scanPosition + attributeResultRange.length == currentLength) break;
// A match was found - retrieve the location
- NSUInteger matchStart = attributeResultRange.location+attributeResultRange.length;
+ NSUInteger matchStart = NSMaxRange(attributeResultRange);
if ([[theView textStorage] attribute:kSPAutoCompletePlaceholderName atIndex:matchStart longestEffectiveRange:&attributeResultRange inRange:NSMakeRange(matchStart, currentLength - matchStart)]) {
[theView shouldChangeTextInRange:attributeResultRange replacementString:@""];
[[theView textStorage] deleteCharactersInRange:attributeResultRange];