do not sync program for brace matching

This commit is contained in:
Vladimir Matveev 2016-07-22 16:09:56 -07:00
parent bb016148da
commit a8925f8c9d

View File

@ -1147,12 +1147,12 @@ namespace ts.server {
}
private getBraceMatching(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.TextSpan[] | TextSpan[] {
const { file, project } = this.getFileAndProject(args);
const { file, project } = this.getFileAndProjectWithoutRefreshingInferredProjects(args);
const scriptInfo = project.getScriptInfoForNormalizedPath(file);
const position = this.getPosition(args, scriptInfo);
const spans = project.getLanguageService().getBraceMatchingAtPosition(file, position);
const spans = project.getLanguageService(/*ensureSynchronized*/ false).getBraceMatchingAtPosition(file, position);
if (!spans) {
return undefined;
}