aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-03-09 00:00:43 +0100
committerMax <post@wickenrode.com>2015-03-09 00:00:43 +0100
commit784876380b871b6d85978a705e2477e7b7d2d984 (patch)
tree5705e92b0aab9fecdf7d37954f5a0c3e873de1ff /Source/SPNarrowDownCompletion.m
parentb15c7fb2d407ec8751a2579a7a68bbd8a037ccfe (diff)
downloadsequelpro-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.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];