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/SPTextViewAdditions.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/SPTextViewAdditions.m')
-rw-r--r-- | Source/SPTextViewAdditions.m | 10 |
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)]; } } |