Issue: Commit on enter isn't working correctly for JS completions in VS

Fix: revert the change to always return true for isNewIdentifierLocation for JavaScript files.
With recent Roslyn completion list changes and the new VS default statement completion settings to "Only use Tab or Enter to commit" this change is no longer required.
There is no longer a completion on space issue for JavaScript in VS and the previous fix is stopping completion on enter from working correctly.
This commit is contained in:
Jason Ramsay 2016-09-27 13:22:48 -07:00
parent a633652f08
commit 0a83d797dd

View File

@ -56,7 +56,7 @@ namespace ts.Completions {
addRange(entries, keywordCompletions);
}
return { isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation || isSourceFileJavaScript(sourceFile), entries };
return { isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries };
function getJavaScriptCompletionEntries(sourceFile: SourceFile, position: number, uniqueNames: Map<string>): CompletionEntry[] {
const entries: CompletionEntry[] = [];