diff options
author | Max <post@wickenrode.com> | 2015-03-09 00:00:43 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-03-09 00:00:43 +0100 |
commit | 784876380b871b6d85978a705e2477e7b7d2d984 (patch) | |
tree | 5705e92b0aab9fecdf7d37954f5a0c3e873de1ff /Source/SPNarrowDownCompletion.m | |
parent | b15c7fb2d407ec8751a2579a7a68bbd8a037ccfe (diff) | |
download | sequelpro-784876380b871b6d85978a705e2477e7b7d2d984.tar.gz sequelpro-784876380b871b6d85978a705e2477e7b7d2d984.tar.bz2 sequelpro-784876380b871b6d85978a705e2477e7b7d2d984.zip |
Minimal refactoring
Replaced some (range.location + range.length) with NSMaxRange(range)
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 2 |
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]; |