aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-24 14:10:47 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-24 14:10:47 +0000
commit46a03988501d393085ea01956460e24f63fb257c (patch)
treece789528ec0c9af4604dfc5e737be607f259ab09 /Source/SPTextViewAdditions.m
parentf1b7ccbcdd139a040adb8caae3366f998b2df75a (diff)
downloadsequelpro-46a03988501d393085ea01956460e24f63fb257c.tar.gz
sequelpro-46a03988501d393085ea01956460e24f63fb257c.tar.bz2
sequelpro-46a03988501d393085ea01956460e24f63fb257c.zip
• some minor code cleaning and improvements
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 6723fa7f..9cefa758 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -63,7 +63,11 @@
end++;
}
- return(NSMakeRange(start, end-start));
+ NSRange wordRange = NSMakeRange(start, end-start);
+ if(wordRange.length && [[self string] characterAtIndex:NSMaxRange(wordRange)-1] == '.')
+ wordRange.length--;
+
+ return(wordRange);
}