aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-02-19 11:35:31 +0000
committerBibiko <bibiko@eva.mpg.de>2010-02-19 11:35:31 +0000
commit69497bca10ddacbee15d48496455a371ea5ab9b0 (patch)
treec36fb1f524c35341bb1f8f5b25c022fc0ee412a6
parente0e594cf921768218f19d9596f3214419482ff09 (diff)
downloadsequelpro-69497bca10ddacbee15d48496455a371ea5ab9b0.tar.gz
sequelpro-69497bca10ddacbee15d48496455a371ea5ab9b0.tar.bz2
sequelpro-69497bca10ddacbee15d48496455a371ea5ab9b0.zip
• CMTextView completion
- if user types foo. while completion list is open and no suggestion is found re-invoke completion automatically due to the fact that it's very likely that the user wants to insert either a table or field
-rw-r--r--Source/SPNarrowDownCompletion.m8
1 files changed, 7 insertions, 1 deletions
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 <tgmath.h>
@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);