aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 885e51df..38560b31 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -31,8 +31,11 @@
*/
- (NSRange)getRangeForCurrentWord
{
-
NSRange curRange = [self selectedRange];
+
+ if (curRange.length)
+ return curRange;
+
unsigned long curLocation = curRange.location;
[self moveWordLeft:self];
@@ -57,7 +60,6 @@
[self setSelectedRange:curRange];
return(wordRange);
-
}
/*