diff options
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 1e6a9247..3de3067f 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -171,7 +171,7 @@ [stateTimer release]; stateTimer = nil; if(syncArrowImages) [syncArrowImages release]; - [self performSelectorOnMainThread:@selector(reInvokeCompletion) withObject:nil waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(reInvokeCompletion) withObject:nil waitUntilDone:YES]; closeMe = YES; return; } @@ -184,10 +184,14 @@ - (void)reInvokeCompletion { + if(stateTimer) { + [stateTimer invalidate]; + [stateTimer release]; + stateTimer = nil; + } [theView setCompletionIsOpen:NO]; [self close]; - usleep(70); - [theView doCompletionByUsingSpellChecker:dictMode fuzzyMode:fuzzyMode autoCompleteMode:NO]; + [theView performSelector:@selector(refreshCompletion) withObject:nil afterDelay:0.0]; } - (id)initWithItems:(NSArray*)someSuggestions alreadyTyped:(NSString*)aUserString staticPrefix:(NSString*)aStaticPrefix |