aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index b2da29af..e850f443 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -3691,6 +3691,17 @@
- (void)windowWillClose:(NSNotification *)aNotification
{
+ // Cancel autocompletion trigger
+ if([prefs boolForKey:SPCustomQueryAutoComplete])
+ [NSObject cancelPreviousPerformRequestsWithTarget:[customQueryInstance valueForKeyPath:@"textView"]
+ selector:@selector(doAutoCompletion)
+ object:nil];
+ if([prefs boolForKey:SPCustomQueryUpdateAutoHelp])
+ [NSObject cancelPreviousPerformRequestsWithTarget:[customQueryInstance valueForKeyPath:@"textView"]
+ selector:@selector(autoHelp)
+ object:nil];
+
+
[[SPNavigatorController sharedNavigatorController] removeConnection:[self connectionID]];
[mySQLConnection setDelegate:nil];