diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-10 12:54:30 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-10 12:54:30 +0000 |
commit | f8f8a867b96a5559a136bfa3e671788e6fd4a31c (patch) | |
tree | 7b7ac2571c9ff36a63414650ce9293b276ba57a9 /Source/SPNarrowDownCompletion.m | |
parent | ca4c4bc3b86ff98bbb4e5ca57a16b0066add02aa (diff) | |
download | sequelpro-f8f8a867b96a5559a136bfa3e671788e6fd4a31c.tar.gz sequelpro-f8f8a867b96a5559a136bfa3e671788e6fd4a31c.tar.bz2 sequelpro-f8f8a867b96a5559a136bfa3e671788e6fd4a31c.zip |
• auto-completion
- suppress completion window if only one item is found and the typed word is equal to it (case-insensitively)
- fixed memory leak
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index a17c3aac..42660be1 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -525,6 +525,7 @@ if(![newFiltered count]) { if(autoCompletionMode) { + [newFiltered release]; closeMe = YES; return; } else { @@ -532,6 +533,7 @@ if([[self filterString] hasSuffix:@"."]) { [theView setCompletionWasReinvokedAutomatically:YES]; [theView doCompletionByUsingSpellChecker:dictMode fuzzyMode:fuzzyMode autoCompleteMode:NO]; + [newFiltered release]; closeMe = YES; return; } else { @@ -539,6 +541,11 @@ } } } + if(autoCompletionMode && [newFiltered count] == 1 && [[[self filterString] lowercaseString] isEqualToString:[[[newFiltered objectAtIndex:0] objectForKey:@"display"] lowercaseString]]) { + [newFiltered release]; + closeMe = YES; + return; + } NSPoint old = NSMakePoint([self frame].origin.x, [self frame].origin.y + [self frame].size.height); |