From 46a03988501d393085ea01956460e24f63fb257c Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 24 Jan 2011 14:10:47 +0000 Subject: =?UTF-8?q?=E2=80=A2=20some=20minor=20code=20cleaning=20and=20impr?= =?UTF-8?q?ovements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTextViewAdditions.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source/SPTextViewAdditions.m') 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); } -- cgit v1.2.3