Skip to content

Commit 4355f92

Browse files
authored
Merge pull request #13488 from microsoft/main
Merge for 1.25.0 (2nd time)
2 parents 86332db + a204903 commit 4355f92

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Extension/src/LanguageServer/protocolFilter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ export function createProtocolFilter(): Middleware {
4545
// client.takeOwnership() will call client.TrackedDocuments.add() again, but that's ok. It's a Set.
4646
client.takeOwnership(document);
4747
void sendMessage(document);
48-
const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
49-
client.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined);
48+
client.ready.then(() => {
49+
const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
50+
client.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined);
51+
}).catch(logAndReturn.undefined);
5052
}
5153
}
5254
},

Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ describe('CppConfigurationLanguageModelTool Tests', () => {
7272
this.isClosed = isClosed;
7373
this.eol = eol;
7474
this.lineCount = lineCount;
75+
this.encoding = '';
7576
}
7677
fileName: string;
7778
isUntitled: boolean;
7879
languageId: string;
7980
version: number;
8081
isDirty: boolean;
8182
isClosed: boolean;
83+
encoding: string;
8284
save(): Thenable<boolean> {
8385
throw new Error('Method not implemented.');
8486
}

0 commit comments

Comments
 (0)