aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m4
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;