Fix to not add parens for global variable built in functions (#940)

This commit is contained in:
Charles Gagnon
2020-04-07 09:56:24 -07:00
committed by GitHub
parent 1cb0b98148
commit 7d37de218a
2 changed files with 19 additions and 2 deletions

View File

@@ -74,8 +74,11 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion
case DeclarationType.BuiltInFunction:
case DeclarationType.ScalarValuedFunction:
case DeclarationType.TableValuedFunction:
// Functions we add on the () at the end since they'll always have them
InsertText = WithDelimitedIdentifier(FunctionPostfix, DeclarationTitle);
// Add ()'s for all functions except global variable system functions (which all start with @@)
if (!DeclarationTitle.StartsWith("@@"))
{
InsertText = WithDelimitedIdentifier(FunctionPostfix, DeclarationTitle);
}
break;
}
}