aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 7272de1d..56103a53 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -247,7 +247,7 @@
// if no selection place the caret at the end of the current word
{
NSRange newRange = [self getRangeForCurrentWord];
- [self setSelectedRange:NSMakeRange(newRange.location + newRange.length, 0)];
+ [self setSelectedRange:NSMakeRange(NSMaxRange(newRange), 0)];
}
}
@@ -269,7 +269,7 @@
// if no selection place the caret at the end of the current word
{
NSRange newRange = [self getRangeForCurrentWord];
- [self setSelectedRange:NSMakeRange(newRange.location + newRange.length, 0)];
+ [self setSelectedRange:NSMakeRange(NSMaxRange(newRange), 0)];
}
}
@@ -291,7 +291,7 @@
// if no selection place the caret at the end of the current word
{
NSRange newRange = [self getRangeForCurrentWord];
- [self setSelectedRange:NSMakeRange(newRange.location + newRange.length, 0)];
+ [self setSelectedRange:NSMakeRange(NSMaxRange(newRange), 0)];
}
}
@@ -312,7 +312,7 @@
// if no selection place the caret at the end of the current word
{
NSRange newRange = [self getRangeForCurrentWord];
- [self setSelectedRange:NSMakeRange(newRange.location + newRange.length, 0)];
+ [self setSelectedRange:NSMakeRange(NSMaxRange(newRange), 0)];
}
}
@@ -335,7 +335,7 @@
// if no selection place the caret at the end of the current word
{
NSRange newRange = [self getRangeForCurrentWord];
- [self setSelectedRange:NSMakeRange(newRange.location + newRange.length, 0)];
+ [self setSelectedRange:NSMakeRange(NSMaxRange(newRange), 0)];
}
}