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/SPTextView.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/SPTextView.m')
-rw-r--r-- | Source/SPTextView.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m index f50ed939..12d6ed13 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -772,8 +772,8 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS backtickMode+=1; leftBacktick = YES; } - if([[self string] length] > parseRange.location+parseRange.length) { - if([[self string] characterAtIndex:parseRange.location+parseRange.length] == '`') { + if([[self string] length] > NSMaxRange(parseRange)) { + if([[self string] characterAtIndex:NSMaxRange(parseRange)] == '`') { backtickMode+=2; parseRange.length++; // adjust parse string for right ` rightBacktick = YES; |