mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
do not sync program for brace matching
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user