Skip to content

Commit a8925f8

Browse files
committed
do not sync program for brace matching
1 parent bb01614 commit a8925f8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/server/session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,12 +1147,12 @@ namespace ts.server {
11471147
}
11481148

11491149
private getBraceMatching(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.TextSpan[] | TextSpan[] {
1150-
const { file, project } = this.getFileAndProject(args);
1150+
const { file, project } = this.getFileAndProjectWithoutRefreshingInferredProjects(args);
11511151

11521152
const scriptInfo = project.getScriptInfoForNormalizedPath(file);
11531153
const position = this.getPosition(args, scriptInfo);
11541154

1155-
const spans = project.getLanguageService().getBraceMatchingAtPosition(file, position);
1155+
const spans = project.getLanguageService(/*ensureSynchronized*/ false).getBraceMatchingAtPosition(file, position);
11561156
if (!spans) {
11571157
return undefined;
11581158
}

0 commit comments

Comments
 (0)