diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-11 20:41:01 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-11 20:41:01 +0000 |
commit | 98af234687c698826817a6c219ce8f731fdfa1e7 (patch) | |
tree | 6feb775ef017193c181f6e6fe613c39ef435d215 /Source | |
parent | 304ab84d1432207f4882386193405aa8fcb760d3 (diff) | |
download | sequelpro-98af234687c698826817a6c219ce8f731fdfa1e7.tar.gz sequelpro-98af234687c698826817a6c219ce8f731fdfa1e7.tar.bz2 sequelpro-98af234687c698826817a6c219ce8f731fdfa1e7.zip |
• append () after completion of a stored procedure
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 42660be1..6667f848 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -769,8 +769,8 @@ // If completion string contains backticks move caret out of the backticks if(backtickMode && !triggerMode) [theView performSelector:@selector(moveRight:)]; - // If it's a function insert () and if given arguments as snippets - else if([prefs boolForKey:SPCustomQueryFunctionCompletionInsertsArguments] && [[[filtered objectAtIndex:[theTableView selectedRow]] objectForKey:@"image"] hasPrefix:@"func"] && ![aString hasSuffix:@")"]) { + // If it's a function or procedure append () and if a argument list can be retieved insert them as snippets + else if([prefs boolForKey:SPCustomQueryFunctionCompletionInsertsArguments] && ([[[filtered objectAtIndex:[theTableView selectedRow]] objectForKey:@"image"] hasPrefix:@"func"] || [[[filtered objectAtIndex:[theTableView selectedRow]] objectForKey:@"image"] hasPrefix:@"proc"]) && ![aString hasSuffix:@")"]) { NSString *functionArgumentSnippet = [NSString stringWithFormat:@"(%@)", [[SPQueryController sharedQueryController] argumentSnippetForFunction:aString]]; [theView insertAsSnippet:functionArgumentSnippet atRange:[theView selectedRange]]; if([functionArgumentSnippet length] == 2) |