From 69497bca10ddacbee15d48496455a371ea5ab9b0 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 19 Feb 2010 11:35:31 +0000 Subject: =?UTF-8?q?=E2=80=A2=20CMTextView=20completion=20-=20if=20user=20t?= =?UTF-8?q?ypes=20foo.=20while=20completion=20list=20is=20open=20and=20no?= =?UTF-8?q?=20suggestion=20is=20found=20re-invoke=20completion=20automatic?= =?UTF-8?q?ally=20due=20to=20the=20fact=20that=20it's=20very=20likely=20th?= =?UTF-8?q?at=20the=20user=20wants=20to=20insert=20either=20a=20table=20or?= =?UTF-8?q?=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPNarrowDownCompletion.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 3b108de6..032e80b3 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -34,6 +34,7 @@ #import "ImageAndTextCell.h" #import "SPConstants.h" #import "RegexKitLite.h" +#import "CMTextView.h" #include @interface NSTableView (MovingSelectedRow) @@ -442,8 +443,13 @@ [newFiltered addObjectsFromArray:suggestions]; } - if(![newFiltered count]) + if(![newFiltered count]) { + if([[self filterString] hasSuffix:@"."]) { + [theView doCompletionByUsingSpellChecker:dictMode fuzzyMode:fuzzyMode]; + closeMe = YES; + } [newFiltered addObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"No completions found", @"no completions found message"), @"display", @"", @"noCompletion", nil]]; + } NSPoint old = NSMakePoint([self frame].origin.x, [self frame].origin.y + [self frame].size.height); -- cgit v1.2.3