We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1709999 commit a204903Copy full SHA for a204903
Extension/src/LanguageServer/protocolFilter.ts
@@ -45,8 +45,10 @@ export function createProtocolFilter(): Middleware {
45
// client.takeOwnership() will call client.TrackedDocuments.add() again, but that's ok. It's a Set.
46
client.takeOwnership(document);
47
void sendMessage(document);
48
- const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
49
- client.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined);
+ client.ready.then(() => {
+ const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
50
+ client.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined);
51
+ }).catch(logAndReturn.undefined);
52
}
53
54
},
0 commit comments