aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-07-15 10:12:34 +0000
committerBibiko <bibiko@eva.mpg.de>2009-07-15 10:12:34 +0000
commit3a0743df3ea4272f90b65e43799f3d9d86ed415a (patch)
tree65d38bad88fea5be2d7ac5de66e3a49c95aaf033 /Source/SPNarrowDownCompletion.m
parenta1f15a4aff3e32817faa5b237f4d1febd3bc4410 (diff)
downloadsequelpro-3a0743df3ea4272f90b65e43799f3d9d86ed415a.tar.gz
sequelpro-3a0743df3ea4272f90b65e43799f3d9d86ed415a.tar.bz2
sequelpro-3a0743df3ea4272f90b65e43799f3d9d86ed415a.zip
• fixed dealloc of 'suggestions' in SPNarrowDownCompletion
• deleted (void)paste hook from CMTextView (not needed anymore) • decreased iteration cycles for 'normal' completion (ESC) by getting only the unique words from the current textView
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r--Source/SPNarrowDownCompletion.m10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index adadd902..e2a52882 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -110,8 +110,7 @@
[mutablePrefix release];
[textualInputCharacters release];
- // TODO: This may cause errors, I cannot see if it is always set up - only if !dictMode.
- // [suggestions release];
+ if(suggestions) [suggestions release];
if (filtered) [filtered release];
@@ -134,9 +133,7 @@
theView = aView;
dictMode = mode;
- if(dictMode) {
- words = [NSArray arrayWithArray:suggestions];
- } else {
+ if(!dictMode) {
suggestions = [someSuggestions retain];
words = nil;
}
@@ -236,8 +233,7 @@
NSArray* newFiltered;
if([mutablePrefix length] > 0)
{
- if(dictMode)
- {
+ if(dictMode) {
newFiltered = [[NSSpellChecker sharedSpellChecker] completionsForPartialWordRange:NSMakeRange(0,[[self filterString] length]) inString:[self filterString] language:nil inSpellDocumentWithTag:0];
} else {
NSPredicate* predicate;