From 98af234687c698826817a6c219ce8f731fdfa1e7 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 11 Mar 2010 20:41:01 +0000 Subject: =?UTF-8?q?=E2=80=A2=20append=20()=20after=20completion=20of=20a?= =?UTF-8?q?=20stored=20procedure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPNarrowDownCompletion.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') 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) -- cgit v1.2.3